Simply print a new line before invoking any return statement within the main function:
#include<stdio.h>
int main(void) {
// ...
printf ("\n"); // print a new line to the stdout device
return 0; // end the program (0 typically indicates no error)
}
if single line comment just place // before for single line comment else if multiple line denote as like this /*............................. ..............................*/ Strictly speaking, // is non.standard in C only in C++
draw a line chart.
putchar ('\n');
A C++ program can be used to write C programs that will display 10 lines of biodata. Many types of C programming can be written with a C++ program.
The return key.
if single line comment just place // before for single line comment else if multiple line denote as like this /*............................. ..............................*/ Strictly speaking, // is non.standard in C only in C++
draw a line chart.
putchar ('\n');
C++ also supports C program's multiple command line /* your command */.
Basic Program in "C" #include <stdio.h> /*This is the standard input/output library function*/ main(void) /*All C programs must have the function main*/ { char ch; printf("This is a C Program."); /* Every line of code in C must end with a semi colon*/ printf("Welcome to C!");/*the printf outputs the line of text to the screen*/ scanf("%c%c", &ch, &ch); /* This is a trick way to pause the computer so you can read the information on the screen*/ return 0; /* Indicates that your program has terminated successfully*/
All C programs have a main() function, and when the end of that is reached, the program terminates, so to end a program, just type the ending curly bracket '}' to match the opening one of the main() function. It is considered good practice to end a program with the statement 'return 0;' before the last curly bracket, to indicate that the program terminated normally.
how can we print without using semi coloum semi coloum ina c program is used to indicate the end of a line......without ; at end the compiler cannot proceed to next step
A C++ program can be used to write C programs that will display 10 lines of biodata. Many types of C programming can be written with a C++ program.
The return key.
In C++, you can write comments two different ways. The old way, which is C compatible, is to bracket the commented text with /* and */. These comment operators extend across lines. The new way, for C++, is the single line comment. You start the comment with //, and everything from that point to the end of the current line is a comment.Note: You can use the preprocessor as well:#if 0Many many lines of comments#endif
C-compiler translates the C-source into Assembly or machine code. On the other hand, C-interpreter -- well, there is no such thing as C-interpreter.
To skip to a new line when reading from a file, assuming you are using a sequentially organized file, the usual case, you need to read and discard characters until you encounter the end-of-line character.