KEMBAR78
Basic c programming and explanation PPT1 | PPTX
Basic C programming
and Explanation
Hello, World!
programming
1
#include <stdio.h>
int main()
{
/* This is first program in C */
printf("Hello, World! n");
return 0;
}
Here is a basic Programming of c
2
Explanation of the codes
#include <stdio.h>
The first line of the program #include <stdio.h> is a preprocessor
command, which tells a C compiler to include stdio.h file before going
to actual compilation.
3
Explanation of the codes
int main()
This is actually a function to invoke a program.it is must necessary
to run any c programming
line int main() is the main function where the program
execution begins.
All function contain one main function
int means main function will return int value
4
Explanation of the codes
/* This is first program in C */
This line is actually Called comments in C by which we can
do our program in efficient way .This will not effect our program.
The next line /*...*/ will be ignored by the compiler
and it has been put to add additional comments in the
program. So such lines are called comments in the program.
5
Explanation of the codes
printf("Hello, World! n");
This is a system function (in built function)
printf(...) is function available in C which causes the
message "Hello, World!" to be displayed
on the screen.
We can write also like this printf(“my name is ABCn”);
6
Explanation of the codes
return 0;
The next line return 0;
terminates the main() function
It means main() function will return 0
7
For More Details About
function()
8
Go to the
function()
video
9
Thank You

Basic c programming and explanation PPT1

  • 1.
    Basic C programming andExplanation Hello, World! programming 1
  • 2.
    #include <stdio.h> int main() { /*This is first program in C */ printf("Hello, World! n"); return 0; } Here is a basic Programming of c 2
  • 3.
    Explanation of thecodes #include <stdio.h> The first line of the program #include <stdio.h> is a preprocessor command, which tells a C compiler to include stdio.h file before going to actual compilation. 3
  • 4.
    Explanation of thecodes int main() This is actually a function to invoke a program.it is must necessary to run any c programming line int main() is the main function where the program execution begins. All function contain one main function int means main function will return int value 4
  • 5.
    Explanation of thecodes /* This is first program in C */ This line is actually Called comments in C by which we can do our program in efficient way .This will not effect our program. The next line /*...*/ will be ignored by the compiler and it has been put to add additional comments in the program. So such lines are called comments in the program. 5
  • 6.
    Explanation of thecodes printf("Hello, World! n"); This is a system function (in built function) printf(...) is function available in C which causes the message "Hello, World!" to be displayed on the screen. We can write also like this printf(“my name is ABCn”); 6
  • 7.
    Explanation of thecodes return 0; The next line return 0; terminates the main() function It means main() function will return 0 7
  • 8.
    For More DetailsAbout function() 8 Go to the function() video
  • 9.