What is the meaning of using static before function declaration? For example following function sum is made static
static int sum(int x, int y, int z)
{
return (x + y + z);
}
Predict the output?
#include <stdio.h>
int main()
{
void demo();
void (*fun)();
fun = demo;
(*fun)();
fun();
return 0;
}
void demo()
{
printf("EduRevQuiz ");
}
1 Crore+ students have signed up on EduRev. Have you? Download the App |
What is the output ?
#include <stdio.h>
int main()
{
int (*ptr)(int ) = fun;
(*ptr)(3);
return 0;
}
int fun(int n)
{
for(;n > 0; n--)
printf("EduRevQuiz ");
return 0;
}
Which of the following is true about return type of functions in C?
#include <stdio.h>
int main()
{
printf("%d", main);
return 0;
}
Output of following program?
#include <stdio.h>
int main()
{
int i = 5;
printf("%d %d %d", i++, i++, i++);
return 0;
}
In C, what is the meaning of following function prototype with empty parameter list
void fun()
{
/* .... */
}
What is the meaning of using extern before function declaration? For example following function sum is made extern
extern int sum(int x, int y, int z)
{
return (x + y + z);
}
Output of following program?
#include<stdio.h>
void dynamic(int s, ...)
{
printf("%d ", s);
}
int main()
{
dynamic(2, 4, 6, 8);
dynamic(3, 6, 9);
return 0;
}
119 docs|30 tests
|
119 docs|30 tests
|