-
Header File
Why should we use header file?
-
What is the heap?
The heap is where malloc(), calloc(), and realloc() get memory. Getting memory from the heap is much slower than getting it from the stack. On the other hand, the heap is much more flexible than the stack. Memory can be allocated at any time and deallocated in any order. Such memory isn’t deallocated automatically; you have to call free(). Recursive data structures are almost always implemented with...
-
-
What is a pragma?
The #pragma preprocessor directive allows each compiler to implement compiler-specific features that can be turned on and off with the #pragma statement. For instance, your compiler might support a feature called loop optimization. This feature can be invoked as a command-line option or as a #pragma directive. To implement this option using the #pragma directive, you would put the following line into...
-
Datatypes Justify Output
#includevoid main(){ float a=0.7; if(a
-
-
-
-
-
Printf() and printf as a variable
Can printf be used as a variable as well as a procedure?
-
-
-
-
-
-
Virtual Functions
Explain the virtual table generated in memory at the time of declaration of virtual function?
-
Reallocating memory
When reallocating memory if any other pointers point into same piece of memory do you have to readjust these pointers or do they get readjusted automatically?
-
Size of an Variable
How to find size of an variable without using sizeof operator?
-
-
String Concatination
How to concatenate the two string without using the predefined functions (such as strcat and strlen)?
C Interview Questions
Ans