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)
}
A C program ends when a return statement is encountered within the main function, or when either the exit() or abort() function is invoked. One or other function is invoked implicitly when an unhandled exception occurs because C does not support exception handling. In multi-threaded C applications, it is vital that all threads of execution are explicitly terminated before the main function terminates.
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.
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
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');
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*/
C++ also supports C program's multiple command line /* your command */.
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
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.
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.
AI Program (artificial intelligence) maybe?