Computer Science, asked by kajaraham, 21 days ago

a c program for printing output as hello world​

Answers

Answered by ashishsahoo6
1

Answer:

#include <stdio. ...

int main() – Here main() is the function name and int is the return type of this function. ...

printf("Hello World"); – This function displays the content within double quotes as it is on the screen.

Answered by HappiestWriter012
1

The code of the program would be:

/* C Program for printing hello world as the output */

#include <stdio.h> // Header file

int main() // main function

{

printf("hello world");

return 0;

}

  • Here We have started with including the header file stdio.h which is Standard Input Output Header file.
  • Any program starts execution from the main function, which here takes no arguments and returns a value of type int.
  • So we have written int main()
  • Then We have used printf which prints text as Output. Notice that we have used ; which is the statement terminator.
  • Next we have written return 0 that is if the program gets executed property, It will show exit code as 0 otherwise some other integer.
  • Also // and /* are used to write comments in the program, which are ignored by the compiler, and helps the reader understand the functionality of the code.
Similar questions