To what value are pointers initialized?
1) NULL
2) Newly allocated memory
3) No action is taken by the compiler to initialize
pointers.
Answers were Sorted based on User's Feedback
no action is taken by complier to initialize pointers
| Is This Answer Correct ? | 21 Yes | 3 No |
Answer / n
depends:
-if static storage for pointer(pointer itself is a global
variable) => initialized with NULL
-if automatic storage =>no initialization
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / harman bajaj
When we create a pointer, then by default the pointer
initialized with NULL value .i.e. ASCII value of NULL is 0.
| Is This Answer Correct ? | 2 Yes | 1 No |
What is the value of y in the following code? x=7;y=0; if(x=6) y=7; else y=1;
How would you write qsort?
What are bit fields? What is their use?
main() { static int ivar=5; printf("%d",ivar--); if(ivar) main(); }
What are global variables and explain how do you declare them?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
What is realloc in c?
What is exit() function?
void main() { int i=5; printf("%d",i+++++i); }
write a program that will print %d in the output screen??
how can i print "hello"
2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier.  Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed.  When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed.  Sequence of take-off is the sequence of addition to the waitlist