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
What is difference between scanf and gets?
please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics
regarding pointers concept
When can you use a pointer with a function?
Is there a way to switch on strings?
What are the disadvantages of a shell structure?
How do you define a function?
What is the use of typedef in structure in c?
Why we use void main in c?
What is actual argument?
Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......
What is the size of empty structure in c?
What are multidimensional arrays?
Why n++ execute faster than n+1 ?
How a string is stored in c?