In this article, we are gonna to discuss questions to expert using printf() function
Here you can find the tutorial 06 questions pdf to practice printf() function ;
https://www.thecn.com/uploads/644dd0/644dd02b41ceaa0eda0d1313/s3/NjMzNWEyM2JhOGE1NWUxZjk5NWIzNTcxLzY0NGRkMDI3YzA1MzBmYWE5ZjBlYTkwMi9JQ1QxNDAyX1R1dG9yaWFsXzA2LnBkZg/1a5d95d48d7d642bb905700100b2420c.pdf
* * * * * * *
* * * * * * *
* * * * * * *
* * * * * * *
* * * * * * *
* * * * * *
* * * * *
* * * *
* * *
* *
*
04)
05) *
* *
* * *
* * * *
* * * * *
* * * * * *
Answer
#include <stdio.h>
int main() {
int rows = 6;
int i, j, k;
for (i = 1; i <= rows; i++)
{
for (k = 1; k <= rows - i; k++)
{
printf(" ");
}
for (j = 1; j <= i; j++)
{
printf("*");
}
printf("\n");
}
return 0;
}
06)
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
Answers
#include <stdio.h>
int main()
{
printf(" \t Curriculum Vitae \n");
printf(" \t_________________\n");
printf("Personal Information\n");
printf("Name – Suhada Basuru Rupasinghe \nAddress – 520,Anwarama, Mawanella \nAge –
21 \n\n");
printf("Academic
Education\n");
printf("_______________\n");
printf(“\tOrdinary Level\n9As\n\n”);
printf(“\tAdvanced Level\nEconomics – A\nBusiness Studies –
B\nAccounting - A\n”);
return 0;
}
int main (void)
{
printf ("Testing...");
printf ("....1");
printf ("...2");
printf ("..3");
printf ("\n");
return 0;
}
BMS Group Members :
· 01)M.G. Janeesha Sinty
Registration number-ICT/21/22/043
CN- JG1539
· 02)R.D. Malsha Nethmini Premathilaka
Registration number- ICT/21/22/085
CN- MN1032
· 03)S. Basuru Rupasinghe
Registration number- ICT/21/22/132
CN- SR1777