Function - Study Mode
[#161] What will be the output of the following C code? #include <stdio.h>
void main()
{
#define max 37
printf("%d", max)
}
Correct Answer
(A) 37
[#162] What will be the output of the following C code? #include <stdio.h>
#define MIN 0
#if MIN
#define MAX 10
#endif
int main()
{
printf("%d %d
", MAX, MIN)
return 0
}
Correct Answer
(B) Compile time error
[#163] Which among the following is the correct syntax to declare a static variable register?
Correct Answer
(D) We cannot use static and register together
[#164] Which part of the program address space is p stored in the following C code? #include <stdio.h>
int *p
int main()
{
int i = 0
p = &i
return 0
}
Correct Answer
(C) Bss segment
[#165] What will be the output of the following C code? #include <stdio.h>
void main()
{
register int x = 0
if (x < 2)
{
x++
main()
}
}
Correct Answer
(A) Segmentation fault