
Learn core concepts, essential formulas, and attempt practice questions designed on the latest TCS NQT testing patterns.
What is output of: int a=5; int *p=&a; *p=10; printf("%d", a);
Correct Answer: A) 10
Step-by-step Solution: p points to a. *p = 10 modifies the value at the address of a, changing a to 10.
If double *d is declared on a 64-bit machine, what is sizeof(d)?
Correct Answer: A) 8 bytes
Step-by-step Solution: On 64-bit systems, all pointers are 8 bytes, regardless of whether they point to char, int, or double.
A pointer declaration double *p does not allocate a double in memory, just an address storage box.