It’s a pointer variable which can hold the address of another pointer variable. It de-refers twice to point to the data held by the designated pointer variable.

Both allocates memory from heap area/dynamic memory. By default calloc fills the allocated memory with 0’s.

By default every local variable of the function is automatic (auto). In the below function both the variables ‘i’ and ‘j’ are automatic variables.

Break can appear only with in the looping control and switch statement. The purpose of the break is to bring the control out from the said blocks.

When control reaches for expression-1 is executed first. Then following expression-2, and if expression-2 evaluates to non-zero ‘set of statements’ and expression-3 is executed, follows expression-2.

If a header file is included with in < > then the compiler searches for the particular header file only with in the built in include path. If a header file is included with in “ “, then the compiler searches for the particular header file first in the current working directory, if not found then in the built in include path.

Get the two’s compliment of the same positive integer. Eg: 1011 (-5)

Step-1 − One’s compliment of 5 : 1010

Step-2 − Add 1 to above, giving 1011, which is -5

A static local variables retains its value between the function call and the default value is 0. The following function will print 1 2 3 if called thrice.

void f() { 
   static int i; 
   printf(“%d “,i); 

If a global variable is static then its visibility is limited to the same source code.

A pointer pointing to nothing is called so. Eg: char *p=NULL;

Used to resolve the scope of global symbol.

main() {
   extern int i;

int i = 20;

Prints the formatted output onto the character array.

The starting address of the array is called as the base address of the array.

If a variable is used most frequently then it should be declared using register storage specifier, then possibly the compiler gives CPU register for its storage to speed up the look up of the variable.

S++, as it is single machine instruction (INC) internally.

A pointer initially holding valid address, but later the held address is released or freed. Then such a pointer is called as dangling pointer.

It is used to alias the existing type. Also used to simplify the complex declaration of the type.

The expression appearing on right side of the assignment operator is called as rvalue. Rvalue is assigned to lvalue, which appears on left side of the assignment operator. The lvalue should designate to a variable not a constant.

The parameters sent to the function at calling end are called as actual parameters while at the receiving of the function definition called as formal parameters.

Yes, it can be but cannot be executed, as the execution requires main() function definition.

When we do not know what type of the memory address the pointer variable is going to hold, then we declare a void pointer for such.

Every local variable by default being an auto variable is stored in stack memory.

A structure containing an element of another structure as its member is referred so.

Declaration associates type to the variable whereas definition gives the value to the variable.

A structure containing the same structure pointer variable as its element is called as self-referential structure.

No, the header file only declares function. The definition is in library which is linked by the linker.

Dividing the program in to sub programs (modules/function) to achieve the given task is modular approach. More generic functions definition gives the ability to re-use the functions, such as built-in library functions.

A C program consists of various tokens and a token is either a keyword, an identifier, a constant, a string literal, or a symbol.

Preprocessor is a directive to the compiler to perform certain things before the actual compilation process begins.

Can be used to input integer in all the supported format.

Yes, if it is not appearing as the last case and if we do not want the control to flow to the following case after default if any.

If the structure/union variable is a pointer variable, to access structure/union elements the arrow operator is used.

We can create integer structure members of differing size apart from non-standard size using bit fields. Such structure size is automatically adjusted with the multiple of integer size of the machine.

The arguments which we pass to the main() function while executing the program are called as command line arguments. The parameters are always strings held in the second argument (below in args) of the function which is array of character pointers. First argument represents the count of arguments (below in count) and updated automatically by operating system.

  • Call by value − We send only values to the function as parameters. We choose this if we do not want the actual parameters to be modified with formal parameters but just used.
  • Call by reference − We send address of the actual parameters instead of values. We choose this if we do want the actual parameters to be modified with formal parameters.

It compares two strings by ignoring the case.

Opens a file both for reading and writing. If a file is not existing it creates one, else if the file is existing it will be over written.

It cannot be used on constants.

It cannot be used on variable which are declared using register storage class.

No, it is a structure defined in stdio.h.

Error, It is invalid that either of the operands for the modulus operator (%) is a real number.

There is only one operator and is conditional operator (? : ).

A pointer holding the reference of the function is called pointer to a function. In general it is declared as follows.

T (*fun_ptr) (T1,T2…); Where T is any date type.

Once fun_ptr refers a function the same can be invoked using the pointer as follows.


Comma operator can be used to separate two or more expressions.

A null statement is no executable statements such as ; (semicolon).

Eg: int count = 0; 
while( ++count<=10 ) ;

Above does nothing 10 times.

A function’s definition prefixed with static keyword is called as a static function. You would make a function static if it should be called only within the same source code.

Backward slash (\) is used.

E.g. #define MESSAGE "Hi, \
Welcome to C"

Ellipses (…) is used for the same. A general function definition looks as follows

void f(int k,…)  {

Enumerations are list of integer constants with name. Enumerators are defined with the keyword enum.

Start the change

Register to become an Instructor

Please login to fill in this form.

  • Your name
  • Your email
  • Your phone number
  • Your message

I’m a Copywriter in a Digital Agency, I was searching for courses that’ll help me broaden my skill set. Before signing up for Rob’s.