0% found this document useful (0 votes)
3 views1 page

Pointer Programming Challenges and Solutions

The document lists ten programming tasks focused on pointer usage in C or C++. Tasks include printing variable addresses, swapping numbers, string manipulation, array operations, and dynamic memory allocation. Each task aims to enhance understanding of pointers and their applications in programming.

Uploaded by

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

Pointer Programming Challenges and Solutions

The document lists ten programming tasks focused on pointer usage in C or C++. Tasks include printing variable addresses, swapping numbers, string manipulation, array operations, and dynamic memory allocation. Each task aims to enhance understanding of pointers and their applications in programming.

Uploaded by

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

Pointer Programming Questions

1 Write a program to print the address of a variable using a pointer.


2 Write a program to swap two numbers using pointers.
3 Write a program to find the length of a string using pointers.
4 Write a program to reverse a string using pointers.
5 Write a program to count vowels and consonants in a string using pointers.
6 Write a program to find the maximum and minimum element in an array using pointers.
7 Write a program to sort an array using pointers.
8 Write a program to pass an array to a function using pointers and calculate the sum of its
elements.
9 Write a program to dynamically allocate memory for an array of n integers and input values.
10 Write a program to demonstrate pointer to pointer (double pointer) by printing a variable’s value
using int **ptr.

You might also like