Skip to content

Programming and Problem Solving

CSE · Quiz · Spring 26

Paper 4 of 6By Shaker Abdullah (4)Switch

Paper 4 of 6

This browser can’t show the PDF here

Open it, and your phone’s PDF viewer takes it, or download it.

Read the questions as text

Read off the PDF by AI, so it may have mistakes. The PDF is the original.

CSE113: Programming and Problem Solving Spring 2026 Quiz - 3 Duration: 35 Minutes Q1 Write down the correct option for each question on your answer script. [5] I. What does the below code snippet print? int a[3] = {1,2,3}; printf("%x %x", a, &a[0]); A) Different addresses B) Same address C) Compiler error D) Undefined II. What does the below code snippet print? void change(int arr[]) { arr[0] = 100; } int main() { int a[3] = {1,2,3}; change(a); printf("%d", a[0]); } A) 1 B) 100 C) Compiler error D) Garbage III. What does the below code snippet print? void change(int *arr) { arr[0] = 100; } int main() { int a[3] = {1,2,3}; change(&a); printf("%d", a[0]); } A) 1 B) 100 C) Compiler error D) Garbage IV. Which is correct? int a[5]; int *p = a; printf("%d", *(p+3)); A) Accesses 4th element B) Accesses 3rd element C) Error D) Undefined V. What does the below code snippet print? int x = 5; int *p = &x; int **q = &p; **q = 10; printf("%d", x); A) 5 B) 10 C) Garbage D) Error Q2 a. Define a structure called Employee with the fields of employee's name, id, age, gender, and salary. [2 + 4 + b. Write a C programme to store 10 employees' information. 4] c. Write a C programme to print the details of the first 5 employees.