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
void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }
What are all different types of pointers in c?
What is include directive in c?
Describe the order of precedence with regards to operators in C.
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
What is pragma in c?
How variables are declared in c?
How do c compilers work?
How can you increase the size of a statically allocated array?
If I have a char * variable pointing to the name of a function ..
What is meant by int main ()?
Write a program to print “hello world” without using semicolon?
What are variables c?
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
How is pointer initialized in c?