0% found this document useful (0 votes)
31 views2 pages

Time: 3 Hours Total Marks: 100

Uploaded by

md2004sameer01
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)
31 views2 pages

Time: 3 Hours Total Marks: 100

Uploaded by

md2004sameer01
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/ 2

Printed Page: 1 of 2

Subject Code: KCS201T


0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM II) THEORY EXAMINATION 2021-22
PROGRAMMING FOR PROBLEM SOLVING

Time: 3 Hours Total Marks: 100


Note: Attempt all Sections. If you require any missing data, then choose suitably.
SECTION A
1. Attempt all questions in brief. 2x10 = 20
Qno Questions CO
(a) Differentiate between void and int datatypes. 1
(b) Draw the Pyramid structure of memory hierarchy. 1
(c) Describe the syntax and working of Ternary operator. 2
(d) Write advantages of Switch statement. 2
(e) Find the output: 3
#include <stdio.h>
int main()
{
int a=100;
printf("%d\n"+1, a);
printf("Value is = %d"+3, a);
return 0;
}
(f) Define function and its type. 3
(g) Find the output: 4
#include<stdio.h>
int main()
{
int arr[1]={10};
printf("%d\n", 0[arr]);
return 0;
}
(h) Define time and space complexity. What is the complexity of bubble sort? 4
(i) Find the output: 5
#include<stdio.h>
int main()
{
printf("%d", sizeof(void *));
return 0;
}
(j) What is the requirement of FREE() function in Dynamic memory allocation. 5

SECTION B
2. Attempt any three of the following: 10x3 = 30
Qno Questions CO
(a) Discuss the various symbols used in flow chart and Draw the flow chart to find 1
the reverse of a number.
(b) Illustrate the concept of type conversion and type casting with program. 2
(c) Write a program to print the pattern 3
1
12
123
1234
123
12
1
Printed Page: 2 of 2
Subject Code: KCS201T
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM II) THEORY EXAMINATION 2021-22
PROGRAMMING FOR PROBLEM SOLVING

(d) Explain bubble sort concept and write the program. 4


(e) Discuss about the command line argument with example. 5
SECTION C
3. Attempt any one part of the following: 10x1 = 10
Qno Questions CO
(a) Explain the different kind of storage classes in C programming. 1
(b) Draw the architecture of Digital computer System and explain its all 1
components.
4. Attempt any one part of the following: 10x1 = 10
Qno Questions CO
(a) Define Operator and Operands. Discuss about the different type of operators 2
used in programming.
(b) What is use of break in switch case? Write a program to develop a 2
calculator using case in character format.
5. Attempt any one part of the following: 10x1 = 10
Qno Questions CO
(a) Write a Program for pattern 3
*****
****
***
**
*
**
***
****
*****
(b) Write a program to print the Fibonacci series using recursive function. 3
Take the limit from the user as input.
6. Attempt any one part of the following: 10x1 = 10
Qno Questions CO
(a) Write a program for the selection sort and explain it with example. 4
(b) Write a program to find the product of two 2-dimensional array and print the 4
output in separate array.
7. Attempt any one part of the following: 10x1 = 10
Qno Questions CO
(a) Write a program to allocate the memory with dynamic memory allocation 5
concept. Take the input from the user and find the sum of all elements.
(b) Discuss about the file handling concept and write a program to copy the 5
content of one file to another and print the count of these coping elements.

You might also like