
Learn core concepts, essential formulas, and attempt practice questions designed on the latest TCS NQT testing patterns.
What is output: int arr[3]={1,2,3}; printf("%d", *(arr+1));
Correct Answer: A) 2
Step-by-step Solution: *(arr+1) is equivalent to arr[1]. arr[1] is 2.
How is string 'OK' stored in memory array?
Correct Answer: A) ['O', 'K', '\0']
Step-by-step Solution: All C strings are appended with a terminating null character ('\0') to mark the end of string.
Array address index formula: *(arr + i) = arr[i] holds universally in C.