Posts

Array Programming in C

Write a program to calculate sum and average of all numbers from an Array(a[10])

Pointer Programming in C

Write a program to find the area of a Circle where area is equal to PI*Radius 2 . The standard value of PI is 3.144. Use pointer variable

Arithmetic Program

Write a program to print all numbers between 1 and 100 which are divisible by 9

Arithmetic Operation in C using Pointer Variable

Write a program which perform arithmetic operation (+, -, *, / , %) which would be an example of demonstrating pointer arithmetic

Pointer Array in C

Provide any example program with the use of pointer and array at a time. void printArray ( int * ptr , size_t length ); { //for statment to print values using array size_t i = 0 ; for ( ; i < length ; ++ i ) printf ( "%d" , ptr [ i ]); } void printString ( const char * ptr ); { //for statment to print values using array for ( ; * ptr != NULL ; ++ ptr ) printf ( "%c" , * ptr ); } int main () { int array [ 6 ] = { 2 , 4 , 6 , 8 , 10 }; const char * str = "Hello World!" ; printArray ( array , 6 ); printString ( str ); return 0 ; }

Recursive Function in C

Write a program to calculate factorial of a given integer number. Use recursive function