write a program to print the one dimensional array.
#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 |
Can we access array using pointer in c language?
#include<stdio.h> int main(){ int a[]={1,2,3,5,1}; int *ptr=a+4; int y=ptr-a; printf("%d",y); }
What is %d called in c?
What does extern mean in a function declaration?
What is wrong with this code?
compare array with pointer?
Write a C program to check a number even or odd, without using any relational, arithmetic operator and any loops.
How can I allocate arrays or structures bigger than 64K?
program for following output using for loop? 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
What is the use of a semicolon (;) at the end of every program statement?
What are comments and how do you insert it in a C program?
List some applications of c programming language?