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

Answers were Sorted based on User's Feedback



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

Answer / surenda pal singh chouhan

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 ?    17 Yes 0 No

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

Answer / revathi

the clrscr()inside the main() just clears the screen.
where the clrscr() outside the main() won't do any action.
it just act as a declaration.

Is This Answer Correct ?    8 Yes 3 No

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

Answer / arpita

lines compiled- 4
warnings-1
errors-1

Is This Answer Correct ?    2 Yes 2 No

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

Answer / skjha

One error.

Type mismatch occur.

Is This Answer Correct ?    1 Yes 1 No

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

Answer / ishrat ali

type mismatch occur

Is This Answer Correct ?    0 Yes 0 No

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

Answer / shruti

Gud question.. have to try this out..

m not sure about the answer..

because clrscr() is an inbuilt function.
so the clrscr() in the main will jump to the function body
which is defined in the header files..

for the second clrscr()...
i donno...

have to check it out.. :-(

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More C Interview Questions

What happens if header file is included twice?

0 Answers  


FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.

0 Answers   Wilco,


What is the purpose of main( ) in c language?

0 Answers  


the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above

0 Answers  


Explain Linker and Loader

5 Answers  






Is it better to use a macro or a function?

0 Answers  


Can you think of a way when a program crashed before reaching main? If yes how?

2 Answers  


What is string in c language?

0 Answers  


What is register variable in c language?

0 Answers  


Disadvantages of C language.

0 Answers   Impetus,


wt is diference between int and int pointer as same as float and float pointer and char and char pointer

8 Answers   CTS, Infosys,


What does a function declared as pascal do differently?

0 Answers  


Categories