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
Explain can the sizeof operator be used to tell the size of an array passed to a function?
Which are low level languages?
What is the advantage of an array over individual variables?
How can I make sure that my program is the only one accessing a file?
Is sizeof a keyword in c?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
Do you have any idea about the use of "auto" keyword?
How is a pointer variable declared?
What is typedf?
c program to compute AREA under integral
What is the 'named constructor idiom'?
How can you read a directory in a C program?
Is c# a good language?
How many levels of pointers can you have?
How can I avoid the abort, retry, fail messages?