#include<stdio.h>
void main()
{
int n=0 , sum =0 ;
int num[n];
printf("Enter total times to input number:");
scanf("%d",&n);
int b=n;
for(int i=0;i<b;i++) //input aray
{
printf("\nenter numbers to add = \t");
scanf("%d",&num[i]);
}
printf("\n \n the reverse array is:-\n ");
for(int i=b;i>0;i--) //reverse array
{
printf("%d",num[i]);
}for(int i=0;i<b;i++) //sum of array
{
sum=sum+num[i];
}
printf(" the sum of array is %d",sum);
}
There are programs of Object-Oriented Programming, Operators (logical, arithmetic ,relational,etc) ,exception handling , inheritance ,string operations ,etc
No comments:
Post a Comment