Functions
- Which of the following function declaration is illegal?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
int 3BHK(int*, int []); or int 2BHK(int); and int IBHK(int s); function declaration are illegal
- Which function definition will run correctly?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
int add(int n, int m)
{return (n + m);}
- Can we use a function as a parameter of another function? [ Eg: void funA(int funB()) ].
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
No, C does not support it
- The value obtained in the function is given back to main by using ________ keyword.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
return
- What will be the output of the following C code?
#include <stdio.h>
int fun(char ch, ...);
int main()
{
char chr = 99;
fun(chr);
return 0;
}
int fun(char chr, ...)
{
printf("%c\n", chr);
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
c