write program on arrays

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the best way of making my program efficient?

561


diff between exptected result and requirement?

1592


What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

660


Describe explain how arrays can be passed to a user defined function

598


Explain union.

633






What would happen to X in this expression: X += 15; (assuming the value of X is 5)

1293


What are 'near' and 'far' pointers?

616


I have seen function declarations that look like this

597


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

1576


What is hungarian notation? Is it worthwhile?

691


to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?

1564


What are the types of bitwise operator?

657


What is static memory allocation?

599


a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if

698


What are the 5 types of organizational structures?

546