61. What will be the output of the following C code?
#include <stdio.h>
int *m();
void main()
{
int *k = m();
printf("hello ");
printf("%d", k[0]);
}
int *m()
{
int a[2] = {5, 8};
return a;
}
#include <stdio.h>
int *m();
void main()
{
int *k = m();
printf("hello ");
printf("%d", k[0]);
}
int *m()
{
int a[2] = {5, 8};
return a;
}
62. What is #include directive?
63. What is #include <stdio.h>?
64. If storage class is not specified for a local variable, then the default class will be auto.
65. What will be the output of the following C code?
#include <stdio.h>
int x = 5;
void main()
{
int x = 3;
m();
printf("%d", x);
}
void m()
{
x = 8;
n();
}
void n()
{
printf("%d", x);
}
#include <stdio.h>
int x = 5;
void main()
{
int x = 3;
m();
printf("%d", x);
}
void m()
{
x = 8;
n();
}
void n()
{
printf("%d", x);
}
66. What will be the output of the following C code (without linking the source file in which ary1 is defined)?
#include <stdio.h>
int main()
{
extern ary1[];
printf("scope rules\n");
}
#include <stdio.h>
int main()
{
extern ary1[];
printf("scope rules\n");
}
67. What will be the output of the following C code?
#include <stdio.h>
static int x;
void main()
{
int x;
printf("x is %d", x);
}
#include <stdio.h>
static int x;
void main()
{
int x;
printf("x is %d", x);
}
68. Which of the following is a correct format for declaration of function?
69. Automatic variables are allocated space in the form of a . . . . . . . .
70. The value obtained in the function is given back to main by using . . . . . . . . keyword.
Read More Section(Function)
Each Section contains maximum 100 MCQs question on Function. To get more questions visit other sections.