Programming For Problem Solving Using C July Aug 2023
Programming For Problem Solving Using C July Aug 2023
#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
|''|'||||''|'''|||'|