C Language - Functions

You Are Here :: Home > C Language > Functions - General Questions

 
25.

main()
{
show();
}
void show()
{
printf("I'm the greatest");
}

A. i m the greatest B. 0
C. Runtime error D. Compiletime error




26.

main()
{
main();
}

A. 1 B. 0
C. Compile time error D. Runtime error




27.

Find the output:

main()
{
int a==4
sqrt(a);
printf("%d",a);
}

A. .2.0 B. . 2
C. . 4.0 D. . 4




28.

#include

int main(){
int a=5,b=10;
swap(a,b);
printf("%d %d",a,b);
return 0;
}
void swap(int a,int b){
int temp;
temp =a;
a=b;
b=temp;
}

A. 5 10 B. 10 5
C. 5 5 D. 10 10




29.

What will be the output of the program?

#include
int check (int, int);
int main()
{
int c;
c = check(10, 20);
printf("c=%d\n", c);
return 0;
}
int check(int i, int j)
{
int *p, *q;
p=&i;
q=&j;
i>=45 ? return(*p): return(*q);
}

A. Print 10 B. Print 20
C. Print 1 D. Compile error




30.

What will be the output of the program?

#include
int func1(int);
int main()
{
int k=35;
k = func1(k=func1(k=func1(k)));
printf("k=%d\n", k);
return 0;
}
int func1(int k)
{
k++;
return k;
}

A. k=35 B. k=36
C. k=37 D. k=38




« previous

1

2

3

4

5

6

7

8

9

...

next »

 
 
 



© 2013 freshersindia.in ® | Copyrights | Terms & Conditions
   Designed by Freshers India
Catch Us on