0% found this document useful (0 votes)
34 views

Programming For Problem Solving Using C July Aug 2023

This document contains a sample exam paper for a Programming for Problem Solving using C course. It consists of 10 questions divided across 5 units. Questions can be answered from any unit and all questions carry equal marks. The questions test concepts like number representation, data types, operators, arrays, pointers, structures, functions, and file handling in C programming. Students are required to write code snippets and programs to demonstrate their understanding of the concepts.

Uploaded by

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

Programming For Problem Solving Using C July Aug 2023

This document contains a sample exam paper for a Programming for Problem Solving using C course. It consists of 10 questions divided across 5 units. Questions can be answered from any unit and all questions carry equal marks. The questions test concepts like number representation, data types, operators, arrays, pointers, structures, functions, and file handling in C programming. Students are required to write code snippets and programs to demonstrate their understanding of the concepts.

Uploaded by

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

Code No: R201110 R20 SET - 1

I B. Tech I Semester Supplementary Examinations, July/August-2023


PROGRAMMING FOR PROBLEM SOLVING USING C
(Common to EEE, ME, ECE, CSE, CSE-CS&T, EIE, IT, ECT, Auto Eng, Min Eng, Pet Eng, CSE-AI&ML,
CSE-AI, CSE-DS, CSE-AI&DS, CSE-CS, CSE-IOT &CS Incl BCT, CSE-CS & BS, CSE-IOT, Food Eng,
AI&DS)
Time: 3 hours Max. Marks: 70
Answer any five Questions one Question from Each Unit
All Questions Carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
UNIT-I
1. a) How computer represents numbers and characters in memory? Can real numbers be [7M]
represented precisely in computer memory? Give examples.
b) Write about Octal and Hexadecimal number systems. And explain the procedure for [7M]
converting a Hexadecimal number to Octal and vice versa.
(OR)
2. a) Which storage class in C language will allow a variable to have life time till end of [7M]
the program? Explain with program.
b) What is the main purpose of Command line arguments in C? Develop a C program to [7M]
demonstrate the usage of command line arguments.
UNIT-II
3. a) Explain the concept of Bitwise Shift operators in C programming. What is the output [7M]
of the following C program?

#include <stdio.h>
int main()
{
int a = 20,x = 0,y=0;
x = a << 2;
y = a >> 2;
printf("x=%d, y=%d", x,y );
return 0;
}
b) Explain various conditional control statements supported by C language with neat [7M]
flowcharts.
(OR)
4. a) Demonstrate the execution behavior of Event and Counter-controlled loops. [7M]
b) Write a C program to display the following pattern on console for the input 5. [7M]
*
* *
* * *
* * * *
* * * * *
UNIT-III
5. a) Explain the memory allocation strategies for one and two-dimensional arrays in C [7M]
programming with neat diagrams.
b) Write a C program to sort the names of 50 employees in lexicographical order. [7M]
1 of 2
|''|'||||''|'''|||'|
Code No: R201110 R20 SET - 1

(OR)
6. a) Write the syntax to define Union? Mention the properties of Union data type and [7M]
brief its limitations.
b) Develop a C program to illustrate the creation and usage of enumeration data type. [7M]

UNIT-IV
7. a) Define Pointer. Discuss its features and uses in C programming. [7M]
b) #include<stdio.h> [7M]
int main()
{
int i;
char ch[] = {'x', 'y', 'z'};
char *ptr, *str1;
ptr = ch;
str1 = ch;
i = (*ptr-- + ++*str1) - 10;
printf("%d", i);
return 0;
}
(OR)
8. a) How does pointer arithmetic work? Which arithmetic operation is not allowed on [7M]
pointers in C?
b) Write a C program to dynamically create memory for accessing the names, marks [7M]
and grades of ‘N’ students.

UNIT-V
9. a) Explain the following [7M]
i) Function prototype ii) Actual and Formal parameters
b) Develop a C program to add two complex numbers using Structures and User defined [7M]
functions.
(OR)
10. a) Discuss various modes of operating text and binary files in C. [7M]
b) Explain about formatted and unformatted I/O functions provided by C to manipulate [7M]
files.

***

2 of 2

|''|'||||''|'''|||'|

You might also like