[Tutorial 6 ] 1. Write a program that prints the following text at the terminal.

#include <stdio.h>

int main (void)

{

printf ("* In C, lowercase letters are significant. \n");

printf ("* main is where program execution begins.\n");

printf ("* Opening and closing braces enclose program statements in a routine.\n");

printf ("* All program statements must be terminated by a semicolon.\n");

return 0;

}

#include <stdio.h> int main(void) {


The program starts with including the standard input-output library and defining the main function, which is where the program execution begins.int main(void) :-

This is the beginning of the main function, which is the entry point of every C program. int is the return type of the main function, and void inside the parentheses indicates that main takes no arguments.

printf("* In C, lowercase letters are significant. \n"); 
printf("* main is where program execution begins.\n");
printf("* Opening and closing braces enclose program statements in a routine.\n"); 
printf("* All program statements must be terminated by a semicolon.\n");

The printf() function is used to print out each statement. 
The \n is used to add a newline at the end of each statement for better formatting.return 0;

This statement indicates that the main function is finished executing, and it returns 0 to the operating system, indicating successful completion of the program.

return 0; }

Finally, the main function returns 0 to the operating system, indicating successful completion of the program.

Comments

Popular posts from this blog

Introduction To C

First C Program

Compilation process in c