write program on arrays

Answers were Sorted based on User's Feedback



write program on arrays ..

Answer / antony

#include<stdio.h>
#include<conio.h>
void main()
{
int a[10],i;
for(i=1;i<=10;i++)//getting data from user
{
scanf("%d",&a[i]);
}
for(i=1;i<=10;i++)//print the data
{
printf("%d",a[i])
}
getch();
}

Is This Answer Correct ?    6 Yes 1 No

write program on arrays ..

Answer / rina

#include<stdio.h>
#include<conio.h>
void main()
{
int i,a[5],n;
clrscr();
printf("\nenter the no.");
scanf("%d",&n);
for(i=1;i<=5;i++)
{
scanf("%d",&a[i]);
}
for(i=1;i<=5;i++)
{
printf("%d",a[i]);
}
getch();
}

Is This Answer Correct ?    1 Yes 1 No

write program on arrays ..

Answer / shrish cahndra tripathi

#include<sotdio.h>
#include<conio.h>
void main()
{
int a[5];
int b=1;
while b<5;
printf("/n enter value of a1");
scanf("%d",a0);
printf("/n enter value of a1");
scanf("%d",a1);
printf("/n enter value of a1");
scanf("%d",a2);
printf("/n enter value of a1");
scanf("%d",a3);
printf("/n enter value of a1");
scanf("%d",a4);
printf("/n values are :- %d, %d, %d, %d, %d"a[i]);
getch();
clrscr();
}

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More C Interview Questions

write a program structure to find average of given number

1 Answers  


What is the time and space complexities of merge sort and when is it preferred over quick sort?

0 Answers   Amazon,


Explain what does it mean when a pointer is used in an if statement?

0 Answers  


What is the difference between Printf(..) and sprint(...) ?

0 Answers   InterGraph,


What are the advantages of c preprocessor?

0 Answers  






What are preprocessor directives?

0 Answers  


which one is not preprocessor directive a)#if b)#elif c)#undef d)#pragma

16 Answers   Accenture, Infosys, TCS, Wipro,


What is 'makefile' in C langauage? How it be useful? How to write a makefile to a particular program?

2 Answers  


What does extern mean in a function declaration?

4 Answers  


What are bitwise shift operators in c programming?

0 Answers  


main() { char *p1="Name"; char *p2; p2=(char *)malloc(20); while(*p2++=*p1++); printf("%s\n",p2); }

4 Answers   CitiGroup,


How can you restore a redirected standard stream?

0 Answers  


Categories