GATE CSE C Programming Practice Test – Function & Storage Class | Set 1

Questions 21-25 of 100

Your score 0/100 0 answered
Correct 0 Incorrect 0 Unanswered 100 Accuracy 0%

Question 21

MCQ · Single Correct 2 mark

Consider a function returning a value: 'int calc(int a) { static int s = 21; s += a; return s; }'. What is returned by calling calc(5) twice consecutively?

Answers for question 21

Question 22

MCQ · Single Correct 1 mark

What does the declaration 'extern int arr[22];' inside a function indicate?

Answers for question 22

Question 23

MCQ · Single Correct 2 mark

What is the effect of declaring a function parameter as 'register int count' in C?

Answers for question 23

Question 24

MCQ · Single Correct 1 mark

Which memory segment stores uninitialized global and static variables in C?

Answers for question 24

Question 25

MCQ · Single Correct 2 mark

What is the scope and linkage of a top-level global variable declared as 'static int var = 25;' in a C source file?

Answers for question 25
Scroll to Top