Company: Qualcomm Software engineering Oncampus_15july

Difficulty: medium

Problem Statement

Point out the error, if any, in the program given below. #include <stdio.h> int main() { int c = 6; int *s = &c; while (*s); //Line 1 { *s += c - 1; //Line 2 printf("%d ", ++*s--); } return 0; } Pick ONE option Line 2 Both Line 1 and Line 2 Line 1 No error in the program Output Format Print the text of the correct option exactly as it appears above.

More Qualcomm Software engineering Oncampus_15july OA questionsInterview experiences