0% found this document useful (0 votes)
2 views2 pages

Level 6 File...

The document outlines a series of C programming exercises categorized by difficulty level: Easy, Medium, and Hard. Each section includes specific tasks focused on pointer concepts, such as declaring pointers, modifying values, pointer arithmetic, and advanced pointer techniques like pointer-to-function and double pointers. The exercises aim to enhance understanding and practical skills in using pointers in C programming.

Uploaded by

Ramya
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Level 6 File...

The document outlines a series of C programming exercises categorized by difficulty level: Easy, Medium, and Hard. Each section includes specific tasks focused on pointer concepts, such as declaring pointers, modifying values, pointer arithmetic, and advanced pointer techniques like pointer-to-function and double pointers. The exercises aim to enhance understanding and practical skills in using pointers in C programming.

Uploaded by

Ramya
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

LEVEL 6 — C PROGRAMMING

EASY (Pointer Basics + * , & + Passing Parameters)

1. Write a C program to declare an integer and print its value using a pointer.
2. Write a C program to modify the value of a variable inside a function using a pointer
parameter.
3. Write a C program to demonstrate the use of * by printing the value stored at a pointer.
4. Write a C program to show how changing the value of a pointer affects which variable it
points to.
5. Write a C program to read an integer from the user using a pointer and print it back.
6. Write a C program to demonstrate pointer initialization and re-assignment with two
integer variables.
7. Write a C program to create a pointer to a float and print the variable’s value using both
variable and pointer.

MEDIUM (Pointer Arithmetic + Pointer Passing to Functions)

1. Write a C program to calculate the sum of elements in an array by passing the array
pointer to a function.
2. Write a C program to print alternate (odd-index) elements of an array using pointer
arithmetic.
3. Write a C program to count how many negative numbers are present in an integer array using
pointer traversal
4. Write a C program to swap three numbers in cyclic order (a→b→c→a) using pointers.
5. Write a C program to find the minimum element in an array using a pointer passed to a
function.
6. Write a C program to calculate the difference between the maximum and minimum values of
an array using pointer arithmetic.
7. Write a C program to compute the difference between adjacent array elements using
pointer arithmetic.

HARD (Advanced Pointer Concepts + Pointer-to-Function + Double Pointers)

1. Write a C program using a pointer-to-pointer (int ) to access and print elements of a 2D array.
2. Write a C program to reverse a string using a pointer-to-pointer (char **).
3. Write a C program to sort an array using a function that takes a pointer to the array and
its size as parameters.
4. Write a C program that uses a function pointer to perform addition, subtraction, and
multiplication.
5. Write a C program to count how many even numbers are present in a 2D array using
pointer traversal.
6. Write a C program to merge two character arrays into one using pointers (without
indexing).
7. Write a C program to rotate an integer array left by k positions using only pointer arithmetic
(no indexing).

You might also like