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

Bcs201 Programming For Problem Solving

Uploaded by

immahima169
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)
10 views2 pages

Bcs201 Programming For Problem Solving

Uploaded by

immahima169
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

Made with Xodo PDF Reader and Editor

Printed Page: 1 of 2
Subject Code: BCS201
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM II) THEORY EXAMINATION 2023-24
PROGRAMMING FOR PROBLEM SOLVING
TIME: 3 HRS M.MARKS: 70
Note: 1. Attempt all Sections. If require any missing data; then choose suitably.

SECTION A
1. Attempt all questions in brief. 2 x 7 = 14
Q no. Question Marks C
O
a. 1Nibble =………..Bytes. 2 1
b. Find the value of variable max in the following code: - 2 2
int a=10, b=20;
int max= (a>b)? a: b;
c. Define Explicit type conversion with suitable example. 2 2
d. Write a C program to print all natural numbers from 10 to 100. 2 3
e. Define Pointer to Pointer. 2 4
f. Find the output of following code: - 2 5
#include<stdio.h>

2
#defien a 2*2+2

13
90

void main ()

2.
{
_2

int b,c;

24
P2

b=2/a;

5.
c=b+4;
4E

.5
printf(“Value of variable b and c are %d%d respectively ”, b,c); 17
P2

}
|1
g. Draw block diagram to represent doubly linked list. 2 5
Q

AM

SECTION B
2. Attempt any three of the following: 7 x 3 = 21
10

a. What is Flowchart what are the properties of Flowchart? Draw a 7 1


flowchart to check number is a buzz number or not. (A number is said
:
05

to be Buzz if it ends with 7 or divisible by 7).


b. What is the importance of Precedence order and associativity? Explain 7 2
9:

Bitwise and Ternary operators in detail.


24

c. Write a program in C language to multiply 2 matrices of order n*n each 7 3


20

and print the resultant matrix along with the transpose of the resultant
matrix.
g-

d. Write a program in C language to implement Selection sort method. 7 4


Au

e. Write a program to delete the end of the file using function feof(). 7 5
0-

Display the file pointer position for detecting end of file.


|2

SECTION C
3. Attempt any one part of the following: 7x1=7
a. What is the different user defined data types in C language? Write 7 1
range, Format specifier, memory size of primitive data types.
b. How algorithm is different form flowchart. Write an algorithm to check 7 1
number is a Prime number or not.

1|Page
QP24EP2_290 | 20-Aug-2024 9:05:10 AM | 117.55.242.132
Made with Xodo PDF Reader and Editor

Printed Page: 2 of 2
Subject Code: BCS201
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0

BTECH
(SEM II) THEORY EXAMINATION 2023-24
PROGRAMMING FOR PROBLEM SOLVING
TIME: 3 HRS M.MARKS: 70
4. Attempt any one part of the following: 7x1=7
a. Why break statement is required? Write a C program in C language to 7 2
check character is a vowel or consonant.
b. Write a program in C language to calculate energy bill. Read the starting 7 2
and ending meter readings. The charges are as follows: -
No. of Units Consumed rates in Rs.
0<units<=200 Rs 5.50 per Unit
200<units<=400 Rs 700 + Rs 6.0 per unit excess of 200

400<units<= 600 Rs 1400 + Rs 7.50 per unit excess of 400

600<units Rs 1850+ Rs 9.0 per Unit excess of 600

2
5. Attempt any one part of the following: 7x1=7

13
90

a. (i) Write a program in C language to print the following pattern: - 7 3

2.
1
_2

24
4 9
P2

16 25 36

5.
49 64 81 100
4E

.5
17
P2

(ii) Write a program in C language to print the sum of following series:


|1
S=1!/n! + 2!/n! + 3!/n!..........x!/n!.
Q

b. Write a program in C language using union to store name, mobile 7 3


AM

number, year of birth, fees deposited, total marks in class 12th and print
only name and marks of class 12th of those students who have deposited
10

fees less that5000 and how born after year 2005.


:
05

6. Attempt any one part of the following: 7x1=7


a. Write a C program to find the presence of any particular element in an 7 4
9:

array of n number of elements using Binary search method.


24

b. What are the different types of functions in C programming? Write a C 7 4


20

program to print the multiplication of all the digits of a number using


recursion.
g-
Au

7. Attempt any one part of the following: 7x1=7


0-

a. What are the advantages of Dynamic memory allocation over static 7 5


memory allocation? Write a program to display two numbers with
|2

malloc () and reallocate memory for displaying three numbers.


b. Define any 3 functions which are used for file handling in C language. 7 5
Write a program in C language to count total number vowels in a text
file.

2|Page
QP24EP2_290 | 20-Aug-2024 9:05:10 AM | 117.55.242.132

You might also like