Functions
Functions
return 0;
}
#include <stdio.h> #include <stdio.h>
void fill(int A[]) #include <stdlib.h>
{ void reading(int a[],int n){
int i; int i;
for (i=0;i<10;i++) for(i=0;i<n;i++){
{ printf("a[%d]=",i);scanf("%
printf("A[%d] :\t", i+1); d",&a[i]);
scanf("%d",&A[i]); }
}
}
#include <stdio.h>
#include <stdlib.h>
void swap(int *a, int *b){
int temp=*a;
*a=*b;
*b=temp;
}
int main()
{
int a,b;
printf("Give an integer a: ");scanf("%d",&a);
printf("Give an integer b: ");scanf("%d",&b);
swap(&a,&b);
printf("a=%d\n",a);printf("b=%d",b);
return 0;
}