main()

{

clrscr();

}

clrscr();

Answers were Sorted based on User's Feedback



main() { clrscr(); } clrscr();..

Answer / susie

Answer :

No output/error

Explanation:

The first clrscr() occurs inside a function. So it becomes a
function call. In the second clrscr(); is a function
declaration (because it is not inside any function).

Is This Answer Correct ?    4 Yes 0 No

main() { clrscr(); } clrscr();..

Answer / mohan

No Error and There is no output

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Code Interview Questions

main() { int i=-1; -i; printf("i = %d, -i = %d \n",i,-i); }

1 Answers  


main() { int i; clrscr(); for(i=0;i<5;i++) { printf("%d\n", 1L << i); } } a. 5, 4, 3, 2, 1 b. 0, 1, 2, 3, 4 c. 0, 1, 2, 4, 8 d. 1, 2, 4, 8, 16

4 Answers   HCL,


#include<stdio.h> #include<conio.h> void main() { int a=(1,2,3,(1,2,3,4); switch(a) { printf("ans:"); case 1: printf("1");break; case 2: printf("2");break; case 3: printf("1");break; case 4: printf("4");break; printf("end"); } getch(); }

0 Answers  


main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

2 Answers  


#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }

1 Answers  






main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }

6 Answers  


main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }

2 Answers   Wipro,


main() { static char names[5][20]={"pascal","ada","cobol","fortran","perl"}; int i; char *t; t=names[3]; names[3]=names[4]; names[4]=t; for (i=0;i<=4;i++) printf("%s",names[i]); }

2 Answers  


#include<stdio.h> void fun(int); int main() { int a; a=3; fun(a); printf("\n"); return 0; } void fun(int i) { if(n>0) { fun(--n); printf("%d",n); fun(--n); } } the answer is 0 1 2 0..someone explain how the code is executed..?

1 Answers   Wipro,


You are given any character string. Find the number of sets of vowels that come in the order of aeiou in the given string. For eg., let the given string be DIPLOMATIC. The answer returned must be "The number of sets is 2" and "The sets are "IO and AI". Vowels that form a singleton set must be neglected. Try to post the program executable in gcc or g++ or in java.

3 Answers  


WAP to display 1,2,3,4,5........N

2 Answers  


Is it possible to type a name in command line without ant quotes?

1 Answers   Excel, Infosys,


Categories