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

How can you be sure that a program follows the ANSI C standard?

1598


What is realloc in c?

1081


Why is extern used in c?

1091


What is static volatile in c?

1019


What would happen to X in this expression: X += 15; (assuming the value of X is 5)

1948


Can a function argument have default value?

1141


How do you determine whether to use a stream function or a low-level function?

1119


Is python a c language?

999


What are the different types of linkage exist in c?

1027


Is it possible to have a function as a parameter in another function?

1072


What's the total generic pointer type?

1050


How are 16- and 32-bit numbers stored?

1282


What is spark map function?

1121


What is the difference between c &c++?

1144


How to implement a packet in C

2881