CSE MCQs :: C-MCQs
-
Which part of the program address space is p stored in the code given below?
int *p = NULL;
int main()
{
int i = 0;
p = &i;
return 0;
} -
Which part of the program address space is p stored in the code given below?
int *p;
int main()
{
int i = 0;
p = &i;
return 0;
} - Property of external variable to be accessed by any source file is called by C90 standard as:
-
What is the output of this C code?
int *i;
int main()
{
if (i == NULL)
printf("true\n");
return 0;
} -
What is the output of this C code?
int *i;
int main()
{
if (i == 0)
printf("true\n");
return 0;
} -
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();
} - Which of following is not accepted in C?
- Which of the following cannot be static in C?
- The scope of an automatic variable is: