41. Which of the following is a complete function?
42. What will be printed when this program is executed?
int f(int x)
{
if(x <= 4)
return x;
return f(--x);
}
void main()
{
printf("%d ", f(7));
}
int f(int x)
{
if(x <= 4)
return x;
return f(--x);
}
void main()
{
printf("%d ", f(7));
}
43. The recursive functions are executed in a ...........
44. The function scanf() returns .........
45. Functions have ..........
46. Which of the following function calculates the square of 'x' in C?
47. When a function is recursively called all the automatic variables are stored in a ..........
48. char* myfunc(char *ptr)
{
ptr+=3;
return(ptr);
}
void main()
{
char *x, *y;
x = "EXAMVEDA";
y = myfunc(x);
printf("y=%s", y);
}
What will be printed when the sample code above is executed?
char* myfunc(char *ptr)
{
ptr+=3;
return(ptr);
}
void main()
{
char *x, *y;
x = "EXAMVEDA";
y = myfunc(x);
printf("y=%s", y);
}
What will be printed when the sample code above is executed?
49. What will be the output of the following C code?
#include <stdio.h>
#define foo(x, y) #x #y
int main()
{
printf("%s\n", foo(k, l));
return 0;
}
#include <stdio.h>
#define foo(x, y) #x #y
int main()
{
printf("%s\n", foo(k, l));
return 0;
}
50. What will be the output of the following C code?
#include <stdio.h>
double var = 8;
int main()
{
int var = 5;
printf("%d", var);
}
#include <stdio.h>
double var = 8;
int main()
{
int var = 5;
printf("%d", var);
}
Read More Section(Function)
Each Section contains maximum 100 MCQs question on Function. To get more questions visit other sections.