` FUNCTION 7.
1. WAP in C using function to insert num in array
WAP in C using function to sum of digit of all at given particular location (index).
elements in array , store results in another array.
i/p: int a[6]={-1,2,3,-5,-7}; , n= 99 , p=2
i/p: int a[6]={1,22,121,34,78,444}; o/p: int a[6]= {-1, 2 ,99 ,3,-5, -7};
o/p: int b[6]= {1, 4, 4, 7, 15, 12 }; void in_fun(int *a, int ele,int n, int p );
void sum_fun(int *a,int *b , int ele );
8.
2. WAP in C using function to merge 2 array data
WAP in C using function to reverse all elements in 3rd array .
of array ,store results in another array.
i/p: int a[6]={2,3,4}, b[3]={11,22,33};
i/p: int a[6]={12,42,123,34,78,414}; o/p: int c[6]= {2,11,3,22,4,33};
o/p: int b[6]={21,24,321,43,87,414};
void rev_fun(int *a,int *b , int ele ); void in_fun(int *a, int *b, int *c,
int ele1,int ele2, int ele3 );
3.
WAP in C using function to delete 1st digits of 9.
all elements in array . WAP in C using function to delete the
duplicate char from given string .
i/p: int a[6]={12,142,1234,314,78,414};
o/p: int a[6]={2,42,234,34,8,14}; i/p: char s[20]=”abcaaabbccaa”;
void del_fun(int *a, int ele ); o/p: abc
void del_fun(char * s );
4.
WAP in C using function to count strong and 10.
armstrong number elements in array . WAP in C using function to delete all digits in
strings and count deleted digits .
i/p: int a[6]={2,153,145,2,3,153};
o/p: strong number count = 3 i/p: char s[20]=”a1b2c3d4123”;
armstrong number count = 5 o/p: abcd , digit count = 7
int strong_fun(int *a, int ele ); int del_count_fun(char * s );
int armstrong_fun(int *a, int ele );
11.
5. WAP in C using function to revesre all word in
WAP in C using function to count -ve element string ,count no of word having digits .
(bitwise op) and delete -ve elements in array . i/p: char s[20]=”coding sirji vec123 A123 ”;
o/p: gnidoc ijris 321cev 321A
i/p: int a[6]={-2, 2,-5,-12,5,-7}; word count = 2
o/p: -ve number count = 4
int a[ ]= {2,5}; void rev_word_fun(char * s );
int count_del_fun(int *a, int *ele ); int count_word_fun(char * s );
6.
WAP in C using function to right rotate array 2 Note: Take all input at runtime (use scanf).
times . Use same function prototype only .
i/p: int a[6]={-2, 2,-5,-12,5,-7}; if you found any mistake or doubts send
o/p: int a[6]={5,-7,-2, 2,-5,-12};
mail to [Link]@[Link]
void rotate_fun(int *a, int ele ,int n);