Company: Qualcomm Software engineering Oncampus_15july
Difficulty: medium
This set contains nine independent multiple-choice questions from the Programming Basics and Computer Science sections of the assessment (C programming, operating systems, data structures and computer architecture). Each question is self-contained: read the stem, study any code shown, and pick the single best option. Q1. What will be the output of the program given below? #include <stdio.h> int main() { int a = 3, b = 5, c = 12; int *pa = &a, *pb = &b, *pc = &c; a +=! (--*pa + *pb) && ++ *pc; *pc += (!++*pa) || *pb++; printf("%d %d %d", a, b, c); return 0; } 2 5 19 3 5 13 3 5 14 4 5 14 Q2. Which of the programs given in the options helps in converting assembly language programs to an object program? Compiler Macroprocessor Assembler Linker Q3. The following code might have a logical error. Identify the error (if it exists) in the code, and how can it be fixed? #include <stdio.h> int main() { int x = 5; int y = 0; int z = x / y; printf("The result is: %d\