C #error in C Language
The #error preprocessor directive indicates error. The compiler gives fatal error if #error directive is found and skips...
The #error preprocessor directive indicates error. The compiler gives fatal error if #error directive is found and skips...
The #else preprocessor directive evaluates the expression or condition if condition of #if is false. It can be used with...
The #if preprocessor directive evaluates the expression or condition. If condition is true, it executes the code otherwi...
The #ifndef preprocessor directive checks if macro is not defined by #define. If yes, it executes the code otherwise #el...
The #ifdef preprocessor directive checks if macro is defined by #define. If yes, it executes the code otherwise #else co...
The #undef preprocessor directive is used to undefine the constant or macro defined by #define.Syntax:#undef token ...
The #define preprocessor directive is used to define constant or micro substitution. It can use any basic data type.Synt...
The #include preprocessor directive is used to paste code of given file into current file. It is used include system-def...
ANSI C defines many predefined macros that can be used in c program.No.MacroDescription1_DATE_represents current date in...
The C preprocessor is a micro processor that is used by compiler to transform your code before compilation. It is called...
The ftell() function returns the current file position of the specified stream. We can use ftell() function to get the t...
The rewind() function sets the file pointer at the beginning of the stream. It is useful if you have to use stream many ...
The fseek() function is used to set the file pointer to the specified offset. It is used to write data into file at desi...
The fputs() and fgets() in C programming are used to write and read string from stream. Let's see examples of writing an...
Writing File : fputc() functionThe fputc() function is used to write a single character into file. It outputs a characte...
Writing File : fprintf() functionThe fprintf() function is used to write set of characters into file. It sends formatted...
In programming, we may require some specific input data to be generated several numbers of times. Sometimes, it is not e...
The size of the union is based on the size of the largest member of the union.union abc{ int a; ch...
Union can be defined as a user-defined data type which is a collection of different variables of different data types in...
#include <stdio.h> struct student { char a; ...
struct student { char a; // 1 byte char b; // 1 byte in...
Structure padding is a concept in C that adds the one or more empty bytes between the memory addresses to align the data...
AngularJS MCQ Quiz Questions with Answer 1) Which of the following is true about the currency filter? A ...
AngularJS MCQ Quiz Questions with Answer 1) Which of the following statement is correct for AngularJS? A...
AngularJS MCQ Quiz Questions with Answer Part 2 1) Which of the following syntax is used to create a module in Angular...
Just like other variables, a structure can also be passed to a function. We may pass the structure members into the func...
1) Separate structureHere, we create two structures, but the dependent structure should be used inside the main structur...
C provides us the feature of nesting one structure within another structure by using which, complex data types are creat...
Why use an array of structures?Consider a case, where we need to store the data of 5 students. We can store it by using ...
The typedef is a keyword used in C programming to provide some meaningful names to the already existing variable in the ...
Structure in c is a user-defined data type that enables us to store the collection of different data types. Each element...
NCERT Solutions for Class 12 Business Studies Business Finance and Marketing Q1: Explain the importance of con...
NCERT Solutions for Class 12 Business Studies Business Finance and Marketing Q1: Explain the importance of cons...
Why use structure?In C, there are cases where we need to store multiple attributes of an entity. It is not necessary tha...
C Programming allows us to perform mathematical operations through the functions defined in <math.h> header file. ...
There are many important string functions defined in "string.h" library.No.FunctionDescription1)strlen(string_name)retur...
The gets() and puts() are declared in the header file stdio.h. Both the functions are involved in the input/output opera...
We have used pointers with the array, functions, and primitive data types so far. However, pointers can be used to point...
Till now, we have used scanf to accept the input from the user. However, it can also be used in the case of strings but ...
Traversing the string is one of the most important aspects in any of the programming languages. We may need to manipulat...
The string can be defined as the one-dimensional array of characters terminated by a null ('\0'). The character array or...
NCERT Solutions for Class 12 English Third level Q1. What does the third level refer to? Answer: T...
The concept of dynamic memory allocation in c language enables the C programmer to allocate memory at runtime. Dynamic m...
Till now, we have seen that in C programming, we can pass the variables as an argument to a function. We cannot pass the...
As we know that we can create a pointer of any data type such as int, char, float, we can also create a pointer pointing...
A Null Pointer is a pointer that does not point to any memory location. It stores the base address of the segment. The n...
As we already know that "what is a pointer", a pointer is a variable that stores the address of another variable. The de...
1. The malloc() and calloc() function return the void pointer, so these functions can be used to allocate the memory of ...
Till now, we have studied that the address assigned to a pointer should be of the same type as specified in the pointer ...
NCERT Solutions for Class 12 English Indigo (set 2) Q1: How was Gandhi able to influence lawyers? Give i...