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

code snippet for creating a pyramids triangle
ex

1
2 2
3 3 3

Answer Posted / vignesh1988i

A SMALL IMPLEMENTATION OF POINTERS

#include<stdio.h>
#include<conio.h>
void main()
{
int n,*p,*q;
printf("enter the number of lines :");
scanf("%d",&n);
for(int i=1,p=&i;*p<=n;*p++)
{
printf("\n");
for(int j=1,q=&j;*q<=*p;*q++)
{
printf("%d",*p);
printf(" ");
}
}
getch();
}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain can the sizeof operator be used to tell the size of an array passed to a function?

1016


Which are low level languages?

1046


What is the advantage of an array over individual variables?

1187


How can I make sure that my program is the only one accessing a file?

1192


Is sizeof a keyword in c?

918


A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles

1119


Do you have any idea about the use of "auto" keyword?

1050


How is a pointer variable declared?

1023


What is typedf?

1066


c program to compute AREA under integral

2336


What is the 'named constructor idiom'?

1032


How can you read a directory in a C program?

1095


Is c# a good language?

963


How many levels of pointers can you have?

1135


How can I avoid the abort, retry, fail messages?

1085