Semester - 1-PROGRAMMING FOR PROBLEM SOLVING 24AF1000ES106
Semester - 1-PROGRAMMING FOR PROBLEM SOLVING 24AF1000ES106
51643574
51643574
1. Each question carries 12 marks.
2. Question No. 1 will be compulsory and include objective-type questions.
3. Candidates are required to attempt any four questions from Question No. 2 to Question No. 6.
4. The level of question/expected answer as per OBE or the Course Outcome (CO) on which the question is based is
mentioned in ( ) in front of the question.
5. Use of non-programmable scientific calculators is allowed.
6. Assume suitable data wherever necessary and mention it clearly.
(Level/CO) Marks
Q. 1 Objective type questions. (Compulsory Question) 12
1 Which generation of computers introduced the use of integrated circuits Remember 1
(ICs)?
a. First b. Second c. Third d. Fourth
Generation Generation Generation Generation
2 Which of the following is a primary function of an operating system? Understand 1
51643574
51643574
51643574
a. Word Understand c. Image editing d. File encryption
processing
3 Which component acts as the brain of a computer system? Understand 1
a. Input device b. Processor c. Output device d. Memory
4 Which of the following is not a valid C data type? Remember 1
a. int b. char c. bool d. string
5 What is the output of the following expression in C? Apply 1
int x = 10, y = 5; printf ("%d", x > y && y < 10);
a. 0 b. 1 c. 5 d. 10
6 Which operator is used for bitwise AND operation in C? Remember 1
a. && b. & c. | d. ||
7 What is the correct syntax for a do-while loop in C? Understand 1
a. do {...} b. do { ... } c. d. do
while(condition); while(condition) while(condition) { while(condition); }
51643574
51643574
51643574
{ ... } do;
8 Which statement is used to exit a loop prematurely in C? Remember 1
a. exit b. break c. continue d. return
9 What will be the output of the following code? Apply 1
int x = 5;
if (x == 5)
printf("Hello");
else
printf("World");
a. Hello b. World c. HelloWorld d. Compilation
Error
10 What is the index of the first element in a C array? Remember 1
a. 1 b. 0 c. -1 d. Depends on the
Page 1
array
11 What does the following pointer declaration mean? Understand 1
int *ptr;
a. ptr is a pointer b. ptr is an c. ptr is a d. None of the
to an integer integer pointer to a above
float
12 Which of the following is used to write data to a file in C? Understand 1
a. fread b. fwrite c. fprintf d. All of the above
51643574
51643574
51643574
Q. 2 Solve the following. 12
A) What are the steps involved in programming? Briefly describe each step. Understanding 6
B) What is the role of memory management in a computer system? Differentiate Analyze 6
between primary and secondary memory.
51643574
51643574
Q. 4 Solve Any Two of the following. 12
A) Differentiate between while, for, and do-while loops with example programs. Understand & 6
Apply
B) Write a c program to demonstrate the use of break and continue in loops. Apply 6
C) Describe the basics of user-defined functions and write a function to calculate Understand & 6
the factorial of a number. Apply
51643574
51643574
Page 2
51643574 51643574 51643574
Page 3