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
Explain how can I open a file so that other programs can update it at the same time?
Explain setjmp()?
What is the importance of c in your views?
An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array
What should malloc(0) do?
Explain what are binary trees?
What is %lu in c?
What is typedef struct in c?
Why void is used in c?
What is the difference between #include
#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }
Differentiate between declaring a variable and defining a variable?
c program for searching a student details among 10 student details
Explain why can’t constant values be used to define an array’s initial size?
Hi can anyone tell what is a start up code?