0% found this document useful (0 votes)
61 views1 page

Cl8 Loop Name

CS

Uploaded by

Anurag Goel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views1 page

Cl8 Loop Name

CS

Uploaded by

Anurag Goel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

#include<stdio.

h>
void main()
{
int i;
char sname[20];
printf("Enter name:");
scanf("%s",&sname);
for(i=1;i<=5;i++)
{
printf("\n%s",sname);
}
}

Enter name: Namit

Namit
Namit
Namit
Namit
Namit
------------------------
#include<stdio.h>
void main()
{
int i;
char sname[20]="Namit";
for(i=1;i<=5;i++)
{
printf("\n%s",sname);
}
}
------------------------
#include<stdio.h>
void main()
{
int i;
char sname[20];
for(i=1;i<=5;i++)
{
printf("\nEnter name:");
scanf("%s",&sname);
printf("\n%s",sname);
}
}

Enter name: Namit


Namit
Enter name: Sumit
Sumit
Enter name: Amit
Amit
Enter name: Ramit
Ramit
Enter name: Gunit
Gunit

------------------------

You might also like