The following steps should be taken:-
Quote:
#include
void main()
{
//variable declarations
//program statement
getch();
}
Note: - After void main() ';' semicolon should not be placed other wise error will occur. Instead of void main() only main() can be used but at the end the program should return a value. Otherwise use void main() if u are a beginner.void main()
{
//program statement
getch();
}
Note:- Giving getch() is not an essential part of the program. It is only given to pause(rather waits for a keystroke ... more precisely your program is waiting for an input) after the completion of the program, since most people run the program pressing Ctrl+F9 and without it, it may seem to you that there was no output given.
No comments:
Post a Comment