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

Questions 91-95 of 100

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

Question 91

NAT · Numerical Answer 2 mark

What is the output printed by the following program?

C
#include <stdio.h>
int fun(int n) {
    static int s = 91;
    s += n;
    return s;
}
int main(void) {
    fun(5);
    printf("%d", fun(5));
    return 0;
}
Answers for question 91

Question 92

NAT · Numerical Answer 1 mark

What is the output printed by the following program?

C
#include <stdio.h>
int fun(int n) {
    static int s = 92;
    s += n;
    return s;
}
int main(void) {
    fun(5);
    printf("%d", fun(5));
    return 0;
}
Answers for question 92

Question 93

NAT · Numerical Answer 2 mark

What is the output printed by the following program?

C
#include <stdio.h>
int fun(int n) {
    static int s = 93;
    s += n;
    return s;
}
int main(void) {
    fun(5);
    printf("%d", fun(5));
    return 0;
}
Answers for question 93

Question 94

NAT · Numerical Answer 1 mark

What is the output printed by the following program?

C
#include <stdio.h>
int fun(int n) {
    static int s = 94;
    s += n;
    return s;
}
int main(void) {
    fun(5);
    printf("%d", fun(5));
    return 0;
}
Answers for question 94

Question 95

NAT · Numerical Answer 2 mark

What is the output printed by the following program?

C
#include <stdio.h>
int fun(int n) {
    static int s = 95;
    s += n;
    return s;
}
int main(void) {
    fun(5);
    printf("%d", fun(5));
    return 0;
}
Answers for question 95
Scroll to Top