0

is this the right program.

#include<stdio.h> int main(){ int i,arr[50],num; printf("\nEnter no of elements :"); scanf("%d",&num); //Reading values into Array printf("\nEnter the values :"); for(i=0;i<num;i++){ scanf("%d",&arr[i]); } //Printing of all elements of array for(i=0;i<num;i++){ printf("\narr[%d] = %d",i,arr[i]); } return(0); }

10th Aug 2016, 4:59 AM
Ameya Patil
Ameya Patil - avatar
2 Antworten
0
What if I wish to enter 51 elements?
10th Aug 2016, 7:40 AM
Nick D.
Nick D. - avatar
0
this is a c program...not c++
10th Aug 2016, 11:19 AM
Alex Andre Railfans Kereta
Alex Andre Railfans Kereta - avatar