Assingment -1
Title
Question
// My First C Program
#include <stdio.h>
int main()
{
printf("welcome to the world of C \n ");
return 0;
}
#include <stdio.h>
int main()
{
printf("welcome to the world of C \n ");
return 0;
}
Mohan S
19ECE16
C-and-Cpp First-C-Program 04-05 min 10-20 sec
Answers:
Assignments are only for self-assessment. If you have any specific question related to this tutorial please post here.
#include<stdio.h>
int main()
{
printf("Welcome to the World of C");
getch();
}
getch(); is use in void main() function return 0; is use in int main() function
Login to add comment
#include<conio.h>
#include<stdio.h>void main()
{
clrscr();
printf("Welcome to the World of C");
getch();
}
<span style="color: #a626a4;">#include</span><span style="color: #50a14f;"><stdio.h></span>
<span style="color: #a626a4;">int</span> <span style="color: #4078f2;">main</span>()
{
<span style="color: #4078f2;">printf</span>(<span style="color: #50a14f;">"Welcome to the World of C"</span>);
<span style="color: #a0a1a7;font-style: italic;">//If the /n is included in the beginning of the statement then the statement gets printed on to the next line </span>
<span style="color: #a0a1a7;font-style: italic;">// If the /n is not included in the beginning of the statement then the statement gets printed on to the first line </span>
<span style="color: #a0a1a7;font-style: italic;">//but if the new statement is to be printed then it will printed on the 3rd line</span>
}
Login to add comment