100% found this document useful (1 vote)
456 views

CPR C Programs - CH05 Pointers

The document lists 26 programming problems involving pointers including reversing a string, finding the largest number in a float array, adding matrices, calculating Fibonacci series, comparing and concatenating strings, sorting arrays, exchanging variable values, counting vowels, printing arrays, adding array elements, finding character occurrences, averaging even numbers, checking palindromes, inverting character case, analyzing strings, counting words, sorting strings, printing ASCII values, validating variable names, printing addresses, replacing characters, checking bracket balance, finding primes, passing arrays to functions, checking start and end of strings, and comparing strings ignoring case.

Uploaded by

api-3728136
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
456 views

CPR C Programs - CH05 Pointers

The document lists 26 programming problems involving pointers including reversing a string, finding the largest number in a float array, adding matrices, calculating Fibonacci series, comparing and concatenating strings, sorting arrays, exchanging variable values, counting vowels, printing arrays, adding array elements, finding character occurrences, averaging even numbers, checking palindromes, inverting character case, analyzing strings, counting words, sorting strings, printing ASCII values, validating variable names, printing addresses, replacing characters, checking bracket balance, finding primes, passing arrays to functions, checking start and end of strings, and comparing strings ignoring case.

Uploaded by

api-3728136
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Chapter 05 Pointers CPR – FYIF

Write C programs for the following:


A) Write a program to reverse the string using pointers.
B) Find the largest number from a float array using pointers.
C) Calculate the addition of two 4 X 4 matrices using pointers. Take
the input from user.
D) Print the Fibonacci series using pointers.
E) Compare two string using pointers and concatenate them if both
of them are equal.
F) Sort the character array in descending order using pointers.
G) Exchange the values of two variables using pointers.
H) Count the number of vowels in a string using pointers.
I) Print the array of integers using pointers to the array.
J) Calculate the addition of all the numbers stored in an array using
pointers.
K) Find the number of occurrences of specific character in the string.
(Make the use of pointers).
L) Declare the array of 20 integer numbers. Find and display the
average of only even numbers by using pointers.
M) Check whether the string is palindrome or not, make the use of
pointers.
N) Inverse the case of characters of a string by using pointers. Upper
case letters must be converted to lower case and lower case to
the upper case.
O) Analyze the string i.e. take the string as the input from user and
count number of characters, numbers and special symbols in it.
(Hint: Make the use of ASCII equivalent of the characters.)
P) Take the sentence as the input and count number of words
existed in it.
Q) Sort the array of strings by using pointers.
R) Print the ASCII equivalents of the characters from the string by
using pointers.
S) Check whether the string inputted is a valid variable name or not.
That is, check whether it is following all the rules of creating
variables name or not?
T) Print the addresses of all the elements stored in the integer array,
float array and character array.
U) Accept the string as the input from user and replace a specific
character with another specific character. Take all three inputs
from user.
V) Input an arithmetic expression from keyboard and check whether
it contains number of opening brackets equal to closing brackets
or not.
W) Find all the prime numbers from 1 to 100 using pointers.
X) Pass the whole array to a function and print it using pointers.
Y) Input a string from keyboard and check whether it is starting and
ending with a number or not?
Z) Compare two strings are equal or not by ignoring the case.

CPR (FYIF) by Mr. Kute T. B. (Lecturer in IT, KK Wagh Polytechnic, Nashik 2007-2008)
-1-

You might also like