Company: Qualcomm Software engineering Oncampus_15july
Difficulty: medium
This set contains eight independent multiple-choice questions from the Programming Basics group of the assessment (sections: Error Finding, Computer Architecture, Data Structures Basics, C Programming). Each question is self-contained. How your answer is graded: your program reads no input. Print the option number you chose for each of the eight questions, one per line, in order Q1 … Q8. Q1 (Error Finding). The given code intends to prompt the user to enter a number, read that number using scanf , and then print the entered number. However, there is an error in the code. Identify the line which is causing the error. #include <stdio.h> // Line 1 int main() { int num; printf("Enter a number: "); scanf("%d", num); // Line 5 printf("The entered number is: %d\n", num); // Line 6 return 0; } Line 6 No Error Line 5 Line 1 Q2 (Computer Architecture). Whenever a subroutine is called, the program counter details are stored in: Stack Linked List Doubly Linked List Queue Q3 (Data Stru