Void main()
{
If(printf("C") && getch ())
}
Then output is C.
If I wrote clrscr() in the place of getch() then it gives error message why..

Answer Posted / shresth tyagi

in if statement if you are using && then it will give you output when both the conditions are true , if one of the conditions are not true than the compiler will give you an error and the correct program is ;
void main()
{ clrscr(); // it is used to clear anything on the command prompt
int i=1;
if(i==1)
printf("C");
getch(); // it is used to get character or string to print
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

im an electronics and communication engineering..i have to attend an interview based on contract basis.i kindly request u to send all possible questions to my mail. MY EMAIL ID IS -ashishkashyap931@gmail.com

1463


sir please provide me the previous technical papers for hpcl writtien exam

1810


Each Electronics Exchange operates on -48 volt. What is the reason that exchange operates only -48 volt DC?

1682


Explain to find resistance?

804


What are fet`s?

805


how a definite tx line can acts as indefinite tx line

1658


i am electronics & comm engg & appling 4 the AAI jr executive (electronics/ATC) written test. pls forward me the syllabus & old question papers.I will be very much thankful to you, snehalsanap@gmail.com

1788


The function of a transistor used in any of the ics is to perform switching action and not amplification. Then why diodes are not used instead of transistors as diodes also exhibit the same switching action?

844


Hi I.m Abishek Chandra Electronics and Communication Engineer fresher 2009. I have 2 job offers. 1. Configuration Engineer at First American Corporation 2.Testing Engineer at Mphsis I don't wat to go by the brand name. I.m thinking in terms of growth

2003


what is potetial,voltage,potential difference

1782


What are the advantages of free wheeling diodes in a controlled in a controlled rectifier?

857


12. Multiprogramming nd multithreading.. Which of these are better? a.multiprogramming b.multithreading c.depends on the system d.both are efficient

4254


Tell me why 440 volts instead of 660 volts in 3 phases of supply system?

770


Explain what is the main application of scr in electronic field as well as in software field?

829


What is scope in rfid?

770