When the Header file includes within double quotes (“”), compiler search first in the working directory for the particular header file. If not found then in the built-in the include path. But when the Header file includes within angular braces (<>), the compiler only searches in the working directory for the particular header file.
-
-
The purpose of the Break keyword is to bring the control out of the code block which is executing. It can appear only in Looping or switch statements.
-
We can use recursion for this purpose. void printNos(unsigned int n) { if(n > 0) { printNos(n-1); printf("%d ", n); } }
-
A loop running within another loop is referred to as a nested loop. The first loop is called the Outer loop and inside the loop is called the Inner loop. The inner loop executes the number of times define an outer loop.
-
This concept called commenting out and is the way to isolate some part of the code which scans possible reason for the error. Also, this concept helps to save time because if the code is not the reason for the issue it can simply uncomment.
-
#define my_sizeof(type) (char *)(&type+1)-(char*)(&type)
-
Pointers are used for storing address of dynamically allocated arrays and for arrays which are passed as arguments to functions. In other contexts, arrays and pointer are two different things. Array name gives address of first element of array. Array members are accessed using pointer arithmetic. Compiler uses pointer arithmetic to access array element. For example, an expression like “arr[i]” is treated as *(arr + i) by the compiler. That is why the expressions like *(arr + i) work for array arr, and expressions like ptr[i] also work for pointer ptr. Array parameters are always passed as pointers, even when…
-
The file contains the definitions and prototypes of the functions being used in the program are called a header file. It is also known as a library file. Example– The header file contains commands like printf and scanf is the stdio.h.
-
Some of the data types in C have special characteristic nature when a developer assigns value beyond the range of the data type. There will be no compiler error and the value change according to a cyclic order. This is called cyclic nature and char, int, long int data types have this property. Further float, double and long double data types do not have this property. This is called cyclic nature and char, int, long int data types have this property. Further float, double and long double data types do not have this property.
-
‘==’ is the comparison operator which is used to compare the value or expression on the left-hand side with the value or expression on the right-hand side. ‘=’ is the assignment operator which is used to assign the value of the right-hand side to the variable on the left-hand side.