0% found this document useful (0 votes)
19 views4 pages

Ps Questions

Uploaded by

Raj
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)
19 views4 pages

Ps Questions

Uploaded by

Raj
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
You are on page 1/ 4

Code No:PSWC202101 R20

CMR CMR INSTITUTE OF TECHNOLOGY


(UGC AUTONOMOUS)
Kandlakoya (V), Medchal Road, Hyderabad -501401
IB.Tech. I Sem Pre-Final Examinations, March 2021

Problem Solving with C


(COMMON TO CSE, CSD,CSM, ECE, ME,CE)

Time: 3 hours Max. Marks: 70

Note: Answer any Five questions.


All Questions carries equal marks.

1. a) List and explain different kinds of operators in C.


b) Write a C program to display prime numbers between the range.

2 a) Explain concept of Bubble sort. Write a C program for Bubble sort?


b) What are storage classes? Explain with examples.

3. a) Write a C program to sort the 10 strings (entered by the user) in lexicographical order
(dictionary order).
b) Describe the concept of dynamic memory allocation.

4. a) How to declare a union in 'C' explain with an example.


b) What are bit-fields? Where are they used? How are they different from other
variables?

5. a) Write a C program to copy the content from one file to another file.
b) What is a file pointer? Explain the steps for sequential file operations

a) Write aC program to generate roots of quadratic equation


b) How to declare, initialize, access one dimensional and two dimensional arrays

a) Write a C program to Check whether the given string palindrome


is or not.
1.
b) Explain about array of structures with example.
about file
positioning functions?
8. a) What is meant by Binary file? Discuss
b) Describe the structure of a C program with example.

***
Code No:PSsWC202102
R20
CMR INSTITUTE OF
CMR
GROLIP OF INSTITUTIONS
TECHNOLOGY
(UGC AUTONOMOUS)
Kandlakoya (V), Medchal Road, Hyderabad -501401
IB.Tech. I Sem Pre-Final Examinations,
March 2021
Problem Solving with C
Time: 3 hours
(COMMON TO CSE, CSD,CSM,ECE, ME,CE)
Max. Marks: 70
Note: Answer any Five
questions.
All Questions carries
equal marks.
1. a) Explain the different types of data types used in 'C'
b) Write a C program to calculate the sum of individuallanguage.
digits
of a given number.
a) Apply binary search to search key 15 in the list 79 10 12 14 15 25?
b) Discuss the concept of Linear search. Write a C
Program to implement linear searchh
technique.
3 a) Describe the concept of pointers in C.
AC program contains the
following declaration.
i) x[8] {10, 20, 30, 40, 50, 60, 70, 80);
int =

i) What is the meaning of x


ii) What is the meaning of (x + 2)
ii) What is the value of *x
iv) What is the value of (*x +2)
v) What is the value of *(x +2)
b) Write a C Program to concatenate two strings without using strcat) function.

4. a) Compare and contrast structures and unions.


b) Write a C program that takes two complex numbers as structures and multiply them

5 a) Briefly discuss about the following


ifeof) ii) ftell() ii)clearerr() iv) fseek() v)rewind).
b) Describe the procedure for copying of two files in C
a) How while loop is different from do while loop? Explain.
b) Write a C program to find smallest and largest numbers ina given array.

7. a) List and explain string manipulation functions with examples.


b) What are the ways to pass structures as argument to a function? Explain with
examples.
characters in file.
a) Write a 'C' program to count the number of
a
8.
b) Discuss about different kinds of arrays in C.
**
R20
Code No:PSWC202103

CMR INSTITUTE OF TECHNOLOGY


CMR (UGC AUTONOMOUS)
501401
Kandlakoya (V), Medchal Road, Hyderabad
-

March 2021
I B.Tech. I Sem Pre-Final Examinations,

Problem Solving withC


COMMON TO CSE, CSD.CSM, ECE, ME,CE)
Max. Marks: 70
Time: 3 hours

Note: Answer any Five questions.


All Questions carries equal marks.

1. a) Describe Repetitive statements with examples.


b) Write a program to perform arithmetic operators using switch case.

2 a) What is recursion? Write a C program to


find factorial of n using recursion.
matrices.
b) Write a C program to multiply two
Writeac program
a) How to declare and initialize string? Explain with examples and
a
functions?
to verify given string palindrome or not using built-in
b) Write short note on the following
i) void pointer ii) *operator iii) & operator iv) pointer v) pointer to pointer

4. a) Define and declare a structure to store date, which including day, month, year
and explain nested structure concept using date structure
Referential Structure.
b) i) Discuss about enumerated type. ii) Self
lowercase letters
a) Write C program to copy one file to another by replacing all
a

in source file to uppercase in destination file.


b) Elucidate the Error handling functions with examples.

6. a) Write aC Program to Fibonacci series of n terms.


b) Explain different types of functions depending upon
the categories of arguments and
return statements with an examples.

1. a) Discuss various valid


arithmetic operations that can performed on pointers in
be C

b) Explain the following i) Array of


structures i) Structure containing array

8 a) Write C program to merge two files into third file.


a

b) Explain Array of strings with an example.


R20
Code No:PSWC202104

CMR INSTITUTE OF TECHNOLOGY


GRN
CMR
CN INSIUIANS (UGC AUTONOMOUS)
Kandlakoya (V),Medchal Road, Hyderabad 501401 -

IB.Tech. I Sem Pre-Final Examinations, March 20021

Problem Solving with C


(COMMON TO CSE, cSD,CSM,ECE, ME,CE)
Max. Marks: 70
Time: 3 hours

Note: Answer any Five questions.


All Questions carries equal marks.

. a) Explain about decision making and branching statements.


else-if ladder.
b) Write a C program to calculate the grade of a student using

. a) Write a program to print transpose of a given matrix.


b) Distinguish Call by value and Call by reference with examples

3. a) Discuss on string Input and Output functions?


based on above
b) int a[5]={10,20,30,40,50}; Explain the following expressions
array of elements
*(a+2) i) *(4+a) i) af1] iv) *a v) 2[a]
i)
initialize and access members of structure
4. a) Define a structure , explain how to declare,
with example.
marks in class of 5
Write a program to calculate average marks and total
a
b)
students by using structure concept.

file
a) Write a program to display contents of the for
on screen.
5. files?
b) Explain any five standard library
functions handling

different rules for


naming variables with examples.
6. a) Define a variable and write the
for the following list of elements
b) Perform the bubble sort method
52,3,88,56,100,6,48,5.

7. a) procedure for swapping two strings using pointers? same


Write the
can be copied to another of the type.
b) Demonstrate how one structure
files? Explain.
a) What operations can be performed
on
8.
two complex numbers using structures.
b) Write a C Program to add and multiply
****

You might also like