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


Tell me a C program to display the following Output?
1 1 1 1 1
2 2 2 2
3 3 3
4 4
5

Answers were Sorted based on User's Feedback



Tell me a C program to display the following Output? 1 1 1 1 1 2 2 2 2 3 3 3 4 4 5..

Answer / deepti

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

Is This Answer Correct ?    9 Yes 1 No

Tell me a C program to display the following Output? 1 1 1 1 1 2 2 2 2 3 3 3 4 4 5..

Answer / devi

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

Is This Answer Correct ?    1 Yes 0 No

Tell me a C program to display the following Output? 1 1 1 1 1 2 2 2 2 3 3 3 4 4 5..

Answer / sreesen@ymail.com

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

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More C Interview Questions

consider the following C code main() { int i=3,x; while(i>0) { x=func(i); i--; } int func(int n) { static sum=0; sum=sum+n; return(sum); } the final value of x is

4 Answers   TCS,


we all know about the function overloading concept used in C++ and we all learnt abt that.... but that concept is already came in C in a very smaller propotion ... my question is IN WHICH CONCEPT THERE IS A USE OF FUNCTION OVERLOADING IS USED in C language?????????????

4 Answers   Google,


‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .

0 Answers  


What is the difference between break and continue?

3 Answers  


#include<stdio.h> void main() { int a [5]; for (i=0; i<=4; i++) printf(“%d” ,a[i]); }

8 Answers  


Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.

0 Answers  


suppose there are five integers write a program to find larger among them without using if- else

2 Answers  


Define a structure to store roll no, name and marks of a student. Using the structure of above write a ‘C’ program to create a file “student.dat”. There must be one record for every student in the file. Accept the data from the user.

0 Answers  


Can a pointer be volatile in c?

0 Answers  


Write a C program to check a number even or odd, without using any relational, arithmetic operator and any loops.

1 Answers  


Implement a function that returns the 5th element from the end in a singly linked list of integers in one pass.

11 Answers   Microsoft,


what is difference between strcmp & palindrome?

3 Answers  


Categories