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

Write a program to print the prime numbers from 1 to 100?

7 Answers  


Do you know the purpose of 'register' keyword?

0 Answers  


How to write a C program to determine the smallest among three nos using conditional operator?

2 Answers   Google,


Write a c program to print the sizes and ranges of different data types in c?

1 Answers  


what are advantages of U D F?

1 Answers   Google,






program to find the second largest word in a paragraph amongst all words that repeat more thn twice

4 Answers   CTS, iGate,


Prove or disprove P!=NP.

5 Answers   Microsoft,


Explain void pointer?

0 Answers  


What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }

0 Answers   Wilco,


How do you write a program which produces its own source code as its output?

4 Answers  


print ur name without using any semicolon in c/c++....

21 Answers   Bosch, TCS, Wipro,


44.what is the difference between strcpy() and memcpy() function? 45.what is output of the following statetment? 46.Printf(“%x”, -1<<4); ? 47.will the program compile? int i; scanf(“%d”,i); printf(“%d”,i); 48.write a string copy function routine? 49.swap two integer variables without using a third temporary variable? 50.how do you redirect stdout value from a program to a file? 51.write a program that finds the factorial of a number using recursion?

6 Answers   Amdocs,


Categories