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 to produce the following output:
1
2 3
4 5 6
7 8 9 10



Write a program to produce the following output: 1 2 3 ..

Answer / ashok kumar

void main()
{
int n,i,j,k=1;
clrscr();
printf("\n Enter a number : ");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=i;j<n;j++)
printf(" ");
for(j=1;j<=i;j++)
printf(" %d ",k++);
printf("\n");
}
getch();
}

Is This Answer Correct ?    31 Yes 19 No

Post New Answer

More C Interview Questions

What is the difference between test design and test case design?

0 Answers  


how we can make 3d venturing graphics on outer interface

1 Answers   Microsoft,


What is the purpose of 'register' keyword in c language?

0 Answers  


simple program for virtual function?

1 Answers  


How can I do serial ("comm") port I/O?

0 Answers   Celstream,


What is the purpose of the statement: strcat (S2, S1)?

0 Answers  


How to use c/c++ code in JAVA

10 Answers   CDAC, IBM, Satyam, Scope International,


Why array is used in c?

0 Answers  


which types of data structure will i use to convert infix to post fix???

5 Answers   IIT,


Does c have class?

0 Answers  


how many keywords are available in 'c' language a) 32 b) 34 c) 45 d) 48

1 Answers  


using only #include <stdio.h> and #include <stdlib.h> Write a program in C that will read an input from the user and print it back to the user if it is a palindrome. The string ends when it encounters a whitespace. The input string is at most 30 characters. Assume the string has no spaces and distinguish between and lowercase. So madam is a palindrome, but MadAm is not a palindrome. Use scanf and %s to read the string. Sample Test: Enter a string: madam madam is a palindrome. Enter a string: 09023 09023 is not a palindrome.

0 Answers  


Categories