write a program to print the one dimensional array.
Answer Posted / manish soni
#include<stdio.h>
#include<conio.h>
void main()
{
int
printf("enter how many no");
scanf("%d",&n);
//arrary input;
for(i=0;i<n;i++)
{
printf("Enter elements %d ",i+1);
scanf("%d",&a[i]);
}
//array output;
for(i=0;i<n;i++)
printf("output at position [%d]is=%d\n",i+1,a[i]);
getch();
}
Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
What is structure pointer in c?
Explain what is the difference between functions abs() and fabs()?
What are the differences between Structures and Arrays?
What language is lisp written in?
What is scope of variable in c?
What is variable initialization and why is it important?
What does 1f stand for?
What is the meaning of typedef struct in c?
How can I read in an object file and jump to locations in it?
in iso what are the common technological language?
How do you construct an increment statement or decrement statement in C?
Can include files be nested?
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
What is the use of getch ()?
What is #define in c?