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 programe returns the number of times the character appears in the string

2 Answers  


why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above

0 Answers  


What are predefined functions in c?

0 Answers  


how to execute with out main in cprogram

15 Answers   Infosys,


Why is the code below functioning. According to me it MUST NOT.

1 Answers  


Is c is a middle level language?

0 Answers  


How can I do graphics in c?

0 Answers  


what is the self-referential structure?

1 Answers  


Tell us bitwise shift operators?

0 Answers  


what is difference between getchar,putchar functions and printf and scanf function? does putchar show output only when input given to it

5 Answers   DIT,


Is the exit() function same as the return statement? Explain.

0 Answers   Agilent, ZS Associates,


What is the difference between char a[] = "string"; and char *p = "string"; ?

14 Answers   Adobe, Honeywell, TCS,


Categories