Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


program for following output using for loop?
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5

Answers were Sorted based on User's Feedback



program for following output using for loop? 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5..

Answer / natu

Hellow Sashi Ur wrong because Ur program is giving output as
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5

but the expected output is
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
please refer and tell me

Is This Answer Correct ?    49 Yes 0 No

program for following output using for loop? 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5..

Answer / lohith

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();

for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",i);
}
printf("\n");
}
getch();
}

Is This Answer Correct ?    43 Yes 9 No

program for following output using for loop? 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5..

Answer / devi

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",i);
}
printf("\n");
}
getch();
}

Is This Answer Correct ?    19 Yes 2 No

program for following output using for loop? 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5..

Answer / jayaraj.s

#include <stdio.h>
main()
{
int a,b;
for(a=1;a<=5;a++)
{
printf("\n%d",a);
for(b=1;b!=a;b++)
{
printf("%d",a);
}
}
getch();
}

Is This Answer Correct ?    8 Yes 2 No

program for following output using for loop? 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5..

Answer / sampath

for(i=1;i<=5;i++){
for(j=i;j<=i;j++)
printf("%d",i);
printf("\n");
}

Is This Answer Correct ?    6 Yes 1 No

program for following output using for loop? 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5..

Answer / pra japati apurv d

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();

for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",i);
}
printf("\n");
}
getch();
}

Is This Answer Correct ?    4 Yes 0 No

program for following output using for loop? 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5..

Answer / aky

#include<iostream.h>
#include<conio.h>
void main()
{
for(int i=1;i<=10;i++)
{
for(int j=1;j<=i;j++)
{
cout<<j;
}
cout<<endl;
}
}

Is This Answer Correct ?    4 Yes 3 No

program for following output using for loop? 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5..

Answer / shashi kumar c.a

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();

for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
}
getch();
}

Is This Answer Correct ?    13 Yes 20 No

Post New Answer

More C Interview Questions

output for following code??? main() { int x=2,y,z; x*=3+2; printf("1.%d\n",x); x*=y=z=4; printf("2.%d %d %d\n",x,y,z); x=y==z; printf("3.%d\n",x); x==(y=z); printf("%d",x); }

2 Answers   Elysium,


Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.

0 Answers   Amazon,


C program to read the integer and calculate sum and average using single dimensional array

0 Answers  


what is the difference between declaration and definition of a variable or function ?

3 Answers  


If you know then define #pragma?

0 Answers  


Write a program in c to replace any vowel in a string with z?

0 Answers   IBS,


write a programming in c language, 1 3 5 7 9 11

2 Answers   NIIT,


Can you return null in c?

0 Answers  


What is scope rule of function in c?

0 Answers  


What are qualifiers?

0 Answers  


why programs in c are running with out #include<stdio.h>? some warnings are display in terminal but we execute the program we get answer why? eg: main() { printf("hello world "); }

0 Answers  


progrem to generate the following series 1 12 123 1234 12345

6 Answers   HCL, Wipro,


Categories