C Programming Question and Answers
49. | What is the difference between typedef and macros? |
---|---|
|
|
50. | What is dynamic data structures? |
---|---|
Dynamic data structure provides a means for storing data more efficiently into memory. Using dynamic memory allocation, your program will access memory spaces as needed. This is in contrast to static data structure, wherein the programmer has to indicate a fix number of memory space to be used in the program. | |
51. | What is an Ivalue? |
---|---|
An Ivalue is an expression to which a value can be assigned. The Ivalues expression is located on the leftside of an assignment statement, whereas an rvalue is located on the right side of an assignment statement. Each assignment statements must have an Ivalue and an rvalue. The Ivalue expression must reference a storage variable in memory. It cannot be a constant. | |
52. | What is the difference between null pointer and uninitialized pointer in C? |
---|---|
Null pointer is a pointer which is pointing to nothing. Null pointer points to empty location in memory. Value of null pointer is 0. We can make a pointer to point to null as below. int * p = NULL; char * p = NULL; uninitialized pointers are called as wild pointers in C which points to arbitrary memory location. This wild pointer may lead a program to behave wrongly or to crash. |
|