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...


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

If the static variable is declared as global, will it be same as extern?

1 Answers   Samsung,


Explain what is wrong with this program statement? Void = 10;

0 Answers  


What is a program?

0 Answers  


Why is c called c?

0 Answers  


How do you generate random numbers in C?

0 Answers  


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

8 Answers   Aptech, Infosys,


What is extern keyword in c?

0 Answers  


Find Index of least significant bit set in an Integer. ex. int value is say 10001000 results should be 4.

1 Answers  


what type of questions arrive in interview over c programming?

0 Answers  


What is a nested formula?

0 Answers  


Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.

0 Answers  


how the size of an integer is decided? - is it based on processor or compiler or OS?

19 Answers   HCL, JPR, Microsoft, nvidia,


Categories