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..



Void main() { If(printf("C") && getch ()) } Then output is C. If I wrote clrs..

Answer / 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

More Electronics Communications Interview Questions

How to convert binary to excess 3 code and vice verse?

0 Answers  


What is simulator programme?

0 Answers  


how to calculate qty. of random rubble masonary in retaining wall?

0 Answers  


why pre and post scalers are used in micro controllers

1 Answers  


A 12v regulated dc power supply has a voltage regulation of 0.5% find amagnitude of variation?

1 Answers   TCS,






Why the aspect ratio of tv video display is 4:3 or 16:9?

0 Answers  


Explain About RRC states

0 Answers  


why we are using register of 1k,10k,100k,47k,330k in cell phone based voting machine project?

0 Answers  


How many Tx Port in One Duplexer.

1 Answers   NSN,


what is the main part of UPS?

1 Answers  


Explain why fet is known as voltage control device?

0 Answers  


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

0 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5085)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4451)
  • Electrical Engineering Interview Questions Electrical Engineering (16632)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)