CSE MCQs :: C-MCQs
- Which of the following storage class supports char data type?
- The variable declaration with no storage class specified is by default:
-
What is the output of this C code?
int x = 5;
void main()
{
int x = 3;
printf("%d", x);
{
x = 4;
}
printf("%d", x);
} - What is the scope of an external variable?
- What is the scope of a function?
-
Which variable has the longest scope?
int b;
int main()
{
int c;
return 0;
}
int a; - Array sizes are optional during array declaration by using ______ keyword.
-
What is the output of this C code?
int x = 5;
void main()
{
int x = 3;
m();
printf("%d", x);
}
void m()
{
x = 8;
n();
}
void n()
{
printf("%d", x);
} -
What is the output of this C code?
void main()
{
m();
m();
}
void m()
{
static int x = 5;
x++;
printf("%d", x);
} -
What is the output of this C code?
void main()
{
static int x;
if (x++ < 2)
main();
}