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
Can math operations be performed on a void pointer?
Explain what is the difference between the expression '++a' and 'a++'?
What are the types of bitwise operator?
What are dangling pointers in c?
What is a pointer variable in c language?
What is a structural principle?
What are run-time errors?
Write a C program linear.c that creates a sequence of
processes with a given length. By
sequence it is meant that each created process has exactly
one child.
Let's look at some example outputs for the program.
Here the entire process sequence consists of process 18181:
Sara@dell:~/OSSS$ ./linear 1
Creating process sequence of length 1.
18181 begins the sequence.
An example for a sequence of length three:
Sara@dell:~/OSSS$ ./linear 3
Creating process sequence of length 3.
18233 begins the sequence.
18234 is child of 18233
18235 is child of 18234
........ this is coad .... BUt i could not compleate it .....:(
#include
what is bit rate & baud rate? plz give wave forms
What are the basic data types associated with c?
What do you understand by normalization of pointers?
What is line in c preprocessor?
How can I avoid the abort, retry, fail messages?
What does c in a circle mean?
What is 02d in c?