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

Questions 26-30 of 100

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

Question 26

MCQ · Single Correct 1 mark

What is the output of the following C code?

C
#include <stdio.h>
int x = 26;
int main(void) {
    int x = 36;
    {
        int x = 46;
        printf("%d ", x);
    }
    printf("%d", x);
    return 0;
}
Answers for question 26

Question 27

MCQ · Single Correct 2 mark

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

Answers for question 27

Question 28

MCQ · Single Correct 1 mark

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

Answers for question 28

Question 29

MCQ · Single Correct 2 mark

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

Answers for question 29

Question 30

MCQ · Single Correct 1 mark

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

Answers for question 30
Scroll to Top