Qualcomm | OA | MCQ | C Programming: Pointer Errors | Dec 5th Campus Assessment

Qualcomm · Question · Posted Apr 2026

Question 1: Computer Science - C Programming Problem Statement: Which of the line(s) generates error in the program given below? #include <stdio.h> int main() { int *ptr, amk = 8; ptr = &amk; ++*ptr; *ptr += 1; //Line 1 amk += amk + ++*ptr; //Line 2 printf("%d", amk); return 0; } Options: Both Line 1 and Line 2 Line 1 Neither Line 1 nor Line 2 Line 2

The full answer & interview discussion are available to premium members.

Log in Create a free account