Вы находитесь на странице: 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
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
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)