{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Delimiters main() as well all other user defined functions begins with an opening brace ‘{‘ () and ends with closing brace ‘}’which are called delimiters and it indicates the ‘} which starts and end of the program body. starts These delimiters can also be used to delimit a piece of code (group of These statements) in the loop structures or control structures statements) 26 26 Structure Of A C++ program Void main() { clrscr(); Cout<<“hello”; } Statement Terminator C++ Statements/Instructions The statements of the program are written under the main() function between curly braces {}. These statements are the body of the program through which we instruct the computer what to do and how to do. Each statement in C++ program ends with a semicolon (;). Semicolon (;) is called as the statement terminator, 27 27 Structure Of A C++ program /*Date : 10/2/2007 */ Void main() { clrscr(); cout<<“Hello”; } Comments Comments The comment statement which is a non­executable statement is used to add remarks or comments in a program. The comments are usually given to explain logic of the program. The compiler ignores the comments given in the program. In C++, comments are given in two ways a. // one line comments b. /* or multiple lines comments */ 28 The C++ character set A character or a group of characters denoted by alphabets, digits and special symbols used to represent information in a language...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online