Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
46 views

C Programming Question Bank

Uploaded by

dummy040507
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

C Programming Question Bank

Uploaded by

dummy040507
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

IMPORTANT QUESTIONS

FOR SOLUTION PART click here

Array: One and Multi-Dimensional

ONE DIMENSIONAL ARRAY

1. Write a program to calculate sum of list by passing array to function.


2. WAP to search an element in array
3. WAP to read and display N integer type array elements.
4. WAP to calculate sum and average of array elements
5. WAP to calculate minimum and maximum from list of numbers
6. WAP to count the number of even/odd numbers in the array
7. Write a program to sort an array in ascending order using bubble sort.
8. WAP to delete all the occurrences of given number from an Array.
9. WAP to split the list of numbers in to two different lists(even and odd
list)
10. Differentiate between arrays and structures.

MULTI DIMENSIONAL ARRAY


1.Write a program to perform matrix multiplication
2.Write a program to perform matrix addition
3.Write a program to perform matrix transpose
4.Write a program which will accept 2-dimensional square matrix and find out
transpose of it. Program should not make use of another matrix.
5.Write a program to perform matrix to find sum of major and minor diagonal of
3*3 matrix
6.Write a program to check whether matrix is symmetric or not.
7.WAP to read and display elements of integer type 2-D array.
Questions
8.Write a Program to calculate andBased on Strings
display sum of all the elements of
the matrix.

STRINGS
1.Write a program to copy one string to another.(with/without using inbuild
function)
2.Write a program to reverse a string.(with/without using inbuild function)
3.Write a program to check a string/word is palindrome or not.
4.Write a C program to count the numbers of vowels, consonants, digits, white
spaces, special characters, and words in a given line of text.
5.Write a program that reads text from keyboard and count the frequency of
any particular character.
6.State any 5 library function in string.h along with its uses.
7.Explain string function for following operation with example.
(1)Copy n char from source string to destination.
(2)Joining of two string.

Copyright by @MathsInDepth For any query, Contact us at : 9049091373


Questions Based on Structures

STRUCTURE

1. Explain nested structure with example.


2. Differentiate between structure & union.
3. Define a structure cricket which consist following members
a. player name
b. country name
c. batting average
Input 20 player information of test playing country. Write a program
which will display detail information of player with given player name.
4. Define a structure called player with data members as player name, team
name, batting average. Store and display the information of at least 10
players.
5. What do you mean by struct? What do you mean by nested structure? A
sport club of cricket needs to maintain data about players. Description
of it is given below. Club want to maintain players name, age, no of
matches played, no of runs, and average. For above description declare a
structure and comment about size of structure of your declaration.
6. Write a program to store and display at least 10 records of the name,
roll number and fees of a student using structure.
7. Write a C-program to create array of structures in order to store
details of almost 100 books. The book details are book name, book price,
book page number and book author name.
8. Write a program to read Title, Author and Price of 5 books using array
of structures. Display the records in ascending order of Price.
9. Define structure within structure consisting of following elements :
1. Employee code
2. Employee name
,
3. Employee salary and
4. Employee date_of_joining
WAP to read at least 10 records and display them.

WHY TO JOIN SEM3 BATCH OF MID


Dear students,
If you are NOT developing problem solving skills during your academics then it would be very difficult to
survive in future as Rise of AI-ML-DS will replace many jobs in future.

MID is an engineering platform started by scholar engineers who are experts in the field of CS.
We teach each chapter with purpose of “WHY”, “HOW” & “APPLICATIONS”
Without proper mentorship, it is tough to achieve heights in life.
due to lack of awareness, many students join unprofessional coaching classes with unprofessional self-
declared teachers. which leads to degradation of personality, mindset, skills & finally failure in job interview.
We train each of our students till 4th year of engineering in order to place them in product companies, in IIT’s
for master Programs through GATE CS/IT.
Get 3 Days free access of MID Course & Feel the difference.

Copyright by @MathsInDepth For any query, Contact us at : 9049091373


Functions & Recursion
1.Explain storage classes with suitable example(auto,extern,static,register).
2.Write a recursive program to calculate factorial of a given number n.
3.What is recursion. write a recursive function to find nth Fibonacci term.
use this function to generate n terms of Fibonacci series.
4.What is recursion? write a program to reverse a number using recursion.
5.Write a C program to find LCM & GCD of two numbers using recursion.
6.Explain the term recursion. Write a program to find summation of n numbers
using recursion.
7.Write a program in C to find out the power of x raised to n (𝑥 𝑛 ), using
non-recursive function (or using recursion).
8.WAP to add two numbers using function.
9.WAP to find maximum among two numbers using function.
.
10.What are the different ways for parameter passing to a function. Explain
along with example.

Switch Case Based Questions


1. Write a C program to implement month name by accepting month number from user.
2. C program to create calculator using switch case
3. C program to print day of week name using switch case
4. C program to print number of days in a month using switch case
5. C program to check vowel or consonant using switch case

Questions on Basics

1. What are bitwise and logical operators in C?


2. Explain following functions with example
sqrt(),fabs(),pow(),ceil(),floor()
3. Explain conditional operator used in C language with proper example.
4. Write a program to accept three numbers from the user and display the greatest
of three using the conditional operator
5. Explain five arithmetic operators used in C language with proper examples.
6. What are the tokens of c language explain with example.
7. Explain the use of following in-built functions of C-language by giving
suitable programming examples and also mention their respective header files in
which they are defined.
i)getch() ii)pow() iii)ceil() iv)puts() v)getchar()
8. short note on Turing and von numen model.
9. what do you mean by algorithm? what points will you consider during algorithm
design?
10. draw flowchart (refer pdf sent in group)

Copyright by @MathsInDepth For any query, Contact us at : 9049091373


Questions on looping and selections

1. Write a program to check if the entered number is prime number or


not.
2. Write a program to print Fibonacci series.
3. Give the difference between entry and exit controlled loop with an example.
4. Explain while loop with example. Differentiate while and do while loop.
5. WAP to find reverse of a number
6. WAP to generate(or check) Armstrong number between 1 to n.
7. WAP to convert from decimal to binary.
8. WAP to find factor of a given number.

Questions on pattern and series

1. WAP to print following pattern.


A * 1 1 * 1
** 23 11 ** 10
BB *** 456 111 *** 101
CCC **** 78910 1111 **** 1010
DDDD ***** 11111 ***** 10101
****** ******
A 1 1 A 1 ABCD
CB 21 2 3 AB 1 1 ABC
FED 123 4 5 6 ABC 1 2 1 AB
JIHG 4321 6 8 9 10 ABCD 1 3 3 1 A
12345 1 4 6 4 1

2. WAP to compute following series


S=1/2+3/4+5/6+7/8+…
S=1/1!+1/2!+1/3!+1/4!+…
𝑋2 𝑋4 𝑋6
S=1- 2! + 4! - 6! +…

S=1+1/2+1/3+1/4+1/5

printf(“All The Best”);

click here To Enroll

Copyright by @MathsInDepth For any query, Contact us at : 9049091373


JUNE

Copyright by @MathsInDepth For any query, Contact us at : 9049091373

You might also like