Simple c question or some simple program on printf
I am writing some questions you have to go to code them.
Questions
1 write a program to show
i love my country.
2 write a program which show
early to bed early to rise makes a man healthy wealthy and wise.
3 write a program which show
my name is vipin i belong to india
Answers
1
#include<stdio.h>;
#include<conio.h>;
void main()
{
clrscr();
printf("i love my country ");
getch();
}
2
#include<stdio.h>;
#include<conio.h>;
void main()
{
clrscr();
printf("early to bed early to rise makes a man healthy wealthy and wise.");
getch();
}
3
#include<stdio.h>;
#include<conio.h>;
void main()
clrscr();
printf("my name is vipin n i belong to india");
getch();
}
4
#include<stdio.h>;
#include<conio.h>;
void main(){
clrscr();
intf("my name is vipin");
intf("i belong to india");
getch();
}
if you do not understand how they solve than read my blog structure of a simple program.
As you can see in 3rd question I use n what’s this combination is used to print from a new line. Is combination are called escape sequence.