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
C program to Print Fibonacci series upto n using recursion: int fibo(long int); void main() {                 long int a=0,n;                 printf ("how many term

Q: Name the operators which cannot be overloaded? A:sizeof, ., .*, .->, ::, ?:

How do you declare an integer variable? Explain with an example.

Respected Sir, I want the above written text in a C program

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Write a ''C'' program to accept any 3 digit integer number from the keyboard and display the word equivalent representation of the given number

Explain the Formatted Input Output with Strings? These are the third set of the scanf and printf families. They are called sscanf and sprintf. sprintf Puts formatted dat


A: Mostly can be overloaded. The only C operators which can't be are. and?: (and sizeof, that is technically an operator). C++ adds a few of its own operators, mostly which can be