Skip to content

Tag Archives: Functions

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… Read More
Predict the output? #include <stdio.h> int main() {     void demo();     void (*fun)();     fun = demo;     (*fun)();     fun();     return 0; }    void demo() {     printf("GeeksQuiz… Read More
Output of following program? #include<stdio.h>    void dynamic(int s, ...) {     printf("%d ", s); }    int main() {     dynamic(2, 4, 6, 8);     dynamic(3, 6,… Read More
Output? #include <stdio.h>    int main() {     int (*ptr)(int ) = fun;     (*ptr)(3);     return 0; }    int fun(int n) {   for(;n > 0; n--)… Read More
#include <stdio.h> int main() {   printf("%d", main);     return 0; } (A) Address of main function (B) Compiler Error (C) Runtime Error (D) Some random value… Read More
Which of the following is true about return type of functions in C? (A) Functions can return any type (B) Functions can return any type… Read More
In C, parameters are always (A) Passed by value (B) Passed by reference (C) Non-pointer variables are passed by value and pointers are passed by… Read More
Output of following program? #include <stdio.h> int main() {     int i = 5;     printf("%d %d %d", i++, i++, i++);     return 0; } (A) 7 6… Read More