progrem to generate the following series
1
12
123
1234
12345

Answers were Sorted based on User's Feedback



progrem to generate the following series 1 12 123 1234 12345..

Answer / srsabariselvan

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

Is This Answer Correct ?    115 Yes 27 No

progrem to generate the following series 1 12 123 1234 12345..

Answer / shakil ahmed

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

Is This Answer Correct ?    65 Yes 16 No

progrem to generate the following series 1 12 123 1234 12345..

Answer / mustafiz

#include<stdio.h>
int main()
{
int row,i;
printf("Enter row number:\n");
scanf("%d",&row);
int sum=0;
for(i=1;i<=row;i++)
{
sum = sum *10 +i;
printf("%d\n",sum);
}
return 0;
}

Is This Answer Correct ?    25 Yes 12 No

progrem to generate the following series 1 12 123 1234 12345..

Answer / f.hnayan

#include<stdio.h>
#include<conio.h>
main()
{
int a,b;
for(a=0;a<=4;a++)
{
for(b=1;b<=(a+1);b++)
{
printf("%d\t",b);
}
printf("\n");
}

return 0;
}

Is This Answer Correct ?    11 Yes 5 No

progrem to generate the following series 1 12 123 1234 12345..

Answer / banavathvishnu

main()
{
int a;
int temp =0;
for(i=1;i<=5;i++)
{
temp = temp *10 +i;
printf("%d",temp);
}

Is This Answer Correct ?    23 Yes 19 No

progrem to generate the following series 1 12 123 1234 12345..

Answer / sachin

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,row;
clrscr();
printf("
How many rows
");
scanf("%d",&row);
for(i=1;i<=row;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf("
");
}
getch();
}

Is This Answer Correct ?    3 Yes 2 No

Post New Answer

More C Interview Questions

What is malloc calloc and realloc in c?

0 Answers  


#include<stdio.h> int main() { int i=0,j=1,k=2,m,n=0; m=i++&&j++&&k++||n++; printf("%d,%d,%d,%d,%d",i,j,k,m,n); }

12 Answers   Capital IQ, Sasken,


write a program for size of a data type without using sizeof() operator?

22 Answers   HCL, IBM,


What is the purpose of 'register' keyword?

0 Answers  


Simplify the program segment if X = B then C &#8592; true else C &#8592; false

0 Answers  






difference between object file and executable file

0 Answers  


What header files do I need in order to define the standard library functions I use?

0 Answers  


write a program without using main function?

2 Answers   TCS,


how to swap 4 number without using temporary number?

2 Answers  


A MobileNumber is a VIP number if it satisfy the following conditions. The operator should be Vodafone. Atleast one 0 (Zero) should be exist in mobile number. The number should not end with 8. The single digit sum of all the digits in the number should be equal to 9. For example if the number is 9876543210, the sum is 9+8+7+...+1+0 = 45. Sum of 4+5 = 9. Write a method: private boolean isVIPMobileNumber(String mobileNum, String operator) mobileNum phone number operator mobile operator as bsnl, Vodafone

1 Answers  


what is c

1 Answers  


How do you use a pointer to a function?

0 Answers  


Categories