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


Please Help Members By Posting Answers For Below Questions

Explain how can I open a file so that other programs can update it at the same time?

586


Explain setjmp()?

651


What is the importance of c in your views?

586


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

683


What should malloc(0) do?

608






Explain what are binary trees?

604


What is %lu in c?

676


What is typedef struct in c?

578


Why void is used in c?

558


What is the difference between #include

and #include “header file”?

544


#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }

664


Differentiate between declaring a variable and defining a variable?

602


c program for searching a student details among 10 student details

1648


Explain why can’t constant values be used to define an array’s initial size?

850


Hi can anyone tell what is a start up code?

1609