Write the skeleton of a C program.
Code:
#include<stdio.h>
int main()
{
/* This is the main body
where all other code stuffs and logic will be written
*/
return 0;
}
Write a program to print the following output:
Hello world!!!
Code:
#include<stdio.h>
int main()
{
printf("Hello World!!!");
return 0;
}
Write a code to print the following output:
Name: Mr. X
Univ: University of Dhaka
Code:
#include<stdio.h>
int main()
{
printf("Name:\tMr. X\n");
printf("Univ:\tUniversity of Dhaka\n");
return 0;
}
Write a program to print the following output:
Code:
#include<stdio.h>
int main()
{
printf(" *\n");
printf(" ***\n");
printf(" *****\n");
printf(" *******\n");
printf(" *********\n");
printf(" *******\n");
printf(" *****\n");
printf(" ***\n");
printf(" *\n");
return 0;
}
Write a program to print the following output: [There are two blank lines in the middle]
Name: Mr. DON
Country: Bangladesh
Contact: mr.don@mycompany.com
Code:
#include<stdio.h>
int main()
{
printf("Name:\tMr. DON\n");
printf("Country:\tBangladesh\n\n\n");
printf("Contact:\tmr.don@mycompany.com\n");
return 0;
}