Some of the basic rules of cpp program, C/C++ Programming

Basic rules of C++ program:

·     It must have only one main function

·     If the main function has return type it must  have return value

·     Statement must end with semicolon

·     To comment one line use //

·     To comment more than one line start /* and end with */

·     The primary variables are declared like C variables.

·     The variables must be separated individually in cin >> and cout < Input and

Output can be managed using I/O console functions.

·     cin can read only words without blank space in string.

Posted Date: 9/20/2012 7:26:57 AM | Location : United States

Related Discussions:- Some of the basic rules of cpp program, Assignment Help, Ask Question on Some of the basic rules of cpp program, Get Answer, Expert's Help, Some of the basic rules of cpp program Discussions

Write discussion on Some of the basic rules of cpp program
Your posts are moderated
Related Questions
A: no, can't. The names of, precedence of, associativity of, and arity of operators is fixed through the language. In C++, there is no operator** so you cannot create one for a

Write a program that predicts users age: Write a program that predicts users' age (0-128 years old) with at most 7 questions. The game starts with asking the user whether he/s

What is Ms dos?

code for solving optimal solution for matrix

Semaphore is used to synchronize processes. whereas mutex is used to give synchronization among threads running in the similar process.

Step 1 Define the start of the program    It should be noted that within C all commands should end in a semi-colon. For most of your programs the definition of a program header as

C Program for SORTING OF NUMBERS   main() {           int a[20],i,j,temp,n;           clrscr();           printf("ENTER THE MAXIMUM LIMIT: ");           scan

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Linear search in array - C program: Write a program in c to define a linear search in array. void main()                 {                 clrscr();