C Programming Questions & Answers: part13



Software Programming : C Programming QUESTIONS AND ANSWERS :: part13 : 1 to 5

Following Software Programming language Entrance Multiple choice objective type questions and answers will help you in Software Programming 2024 examinations :

1.The storage class of a local variable is

Auto
Static
Extern
Register
Default.

2.What is the value of the variable c after the switch statement below? x = 3; switch ( x ) { case 1 : c = 'A'; break; case 2 : c = 'B'; break; case 3 : c = 'C'; break; default: c = 'F'; break; }

S
B
C
F
AB.

3.What is the return value of the following function if the function is called as int value = fun(6); int fun(int n) { if( n = = 1 || n = = 2) return 1; else return( fun(n-1) + fun(n-2) ); }

1
2
Syntax error
8
5.

4.Which of the following is the function prototype of a function f1 that receives an int pointer and float reference and returns an int pointer?

int f1(int &, float *)
float* f1(float &, int &)
int* f1 (int *, float &)
int f1 *(int *, float &)
int f1(&int,*float).

5.m = 5 and y = ++m. The value of m and y after incrementation is

m is 5 and y is 5
m is 5 and y is 6
m is 6 and y is 6
m is 6 and y is 5
m is 7 and y is 5.

More C Programming QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
A real entrepreneur is somebody who has no safety net underneath them. Henry Kravis