Dear near c programming, these C Programming Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of C Programming. What is a pointer on pointer?
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. By default calloc fills the allocated memory with 0’s. A global variable can’t be an automatic variable. What are the valid places for the keyword break to appear.
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. Explain the syntax for for loop. When control reaches for expression-1 is executed first.
Did not find what they wanted? Try here
How a negative integer is stored. Get the two’s compliment of the same positive integer. 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. If a global variable is static then its visibility is limited to the same source code.
A pointer pointing to nothing is called so. What is the purpose of extern storage specifier? Used to resolve the scope of global symbol. Prints the formatted output onto the character array. What is the meaning of base address of the array? The starting address of the array is called as the base address of the array. When should we use the register storage specifier?
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. 1, which can be recommended to increment the value by 1 and why? A pointer initially holding valid address, but later the held address is released or freed. Then such a pointer is called as dangling pointer. What is the purpose of the keyword typedef? It is used to alias the existing type. Also used to simplify the complex declaration of the type.