write a program whose output will be-
1
12
123
1234

Answers were Sorted based on User's Feedback



write a program whose output will be- 1 12 123 1234..

Answer / devi

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

Is This Answer Correct ?    51 Yes 15 No

write a program whose output will be- 1 12 123 1234..

Answer / aditya nath

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

Is This Answer Correct ?    18 Yes 12 No

write a program whose output will be- 1 12 123 1234..

Answer / chaitanya

#include<stdio.h>
void main()
{
int s,i,j,n=1;
printf("enter the length of the sequence
");
scanf("%d",&s);
for(i=1;i<=s;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf(" ");
}
}

Is This Answer Correct ?    3 Yes 2 No

write a program whose output will be- 1 12 123 1234..

Answer / abc_efg

#include<iostream.h>
#include<conio.h>
main()
{
{
for(i=1;i<=4;i++)
{cout<<"\n"
}
for (j=1;j<=4;j++)
}
return 0;
}

Is This Answer Correct ?    5 Yes 7 No

write a program whose output will be- 1 12 123 1234..

Answer / tanish kumar

#include <iostream.h>
#include <conio.h>
void main()
{
clrscr ();
int i, j, n;
cout <<"Enter the value of n=";
cin>>n;
for (i=1;i <=n;i++)
{
for (j=1;j <=i;j++)
{
cout <<j <<" ";
}
cout <<endl;
}
getch ();
}

Is This Answer Correct ?    2 Yes 5 No

write a program whose output will be- 1 12 123 1234..

Answer / ck

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

Is This Answer Correct ?    4 Yes 10 No

write a program whose output will be- 1 12 123 1234..

Answer / riyadh ahmed

//Answer by Riyadh
#include<stdio.h>
int main ()
{
int i,j;
for (i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d",j);
}
printf("
");
}
return 0;
}

Is This Answer Correct ?    1 Yes 7 No

write a program whose output will be- 1 12 123 1234..

Answer / abhishek

#include <iostream>
using namespace std;

int main() {
int i,c=1,p=0;
for(i=0;i<4;i++){
p=p*10+c;
cout<<p<<"
";
c++;
}
return 0;
}

Is This Answer Correct ?    1 Yes 7 No

write a program whose output will be- 1 12 123 1234..

Answer / chaitali shinde

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

Is This Answer Correct ?    8 Yes 16 No

write a program whose output will be- 1 12 123 1234..

Answer / shrikantauti

main()
{
int i;
for (i=1;i<=4;i++)
{
printf(i);
}
}

Is This Answer Correct ?    4 Yes 28 No

Post New Answer

More C Interview Questions

1.find the second maximum in an array? 2.how do you create hash table in c? 3.what is hash collision

9 Answers   HCL, Qualcomm,


What is integer constants?

0 Answers  


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

0 Answers   IBS,


write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34

0 Answers  


What is difference between structure and union?

0 Answers  






int main() { unsigned char a = 0; do { printf("%d=%c\n",a,a); a++; }while(a!=0); return 0; } can anyone please explain me output????

1 Answers  


program for reversing a selected line word by word when multiple lines are given without using strrev

0 Answers   IBM,


What is scope and lifetime of a variable in c?

0 Answers  


GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA

0 Answers  


What is dynamic memory allocation?

0 Answers  


What is page thrashing?

0 Answers  


how do we remove the printed character in printf statement and write next it it

1 Answers  


Categories