Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
27 views

C Programming Mid Semester 2024

Uploaded by

dr_Sakshi_arora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

C Programming Mid Semester 2024

Uploaded by

dr_Sakshi_arora
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

SHRI MATA VAISHNO DEVI UNIVERSITY, KATRA

School of Computer Science & Engineering


B. Tech. (CSE) Mid Semester Examination (Odd Semester) 2024-2025
Entry No: Total Number of Pages: [02]
Date: 09.10.2024 Total Number of Questions: [05]
Course Title: Introduction to C Programming
Course Code: CSL ES101
Time Allowed: 1.5 Hours Max Marks: [20]
Instructions / NOTE
i. Attempt All Questions.
ii. Support your answer with neat freehand sketches/diagrams, wherever appropriate.
iii. Assume an appropriate data / information, wherever necessary / missing.
iv. Use of IS Code (Mention Number) is permissible in examination.

Section - A
Q1 (i) Which is valid C expression? [01]
a) int my_num = 100,000;
. b) int my_num = 100000;
c) int my num = 1000;
d) int $my_num = 10000;
(ii) Which of the following is NOT possible with any 2 operators in C? [01] CO1
a) Different precedence, same associativity
b) Different precedence, different associativity
c) Same precedence, different associativity
d) All of the mentioned
(iii) What is the significance of void data type? [01] CO1
(iv) scanf() is a predefined function in which header file. [01] CO1

(v) Evaluate the following expressions according to the precedence of C [01] CO1
language: exp = 100 + 200 / 10 - 3 * 10
Q2 What is the output of the following code?
. [02] CO3
(i)

(ii)

Page 1 of 2
[02] CO2

(iii [02] CO2


)

Section - B
Q3 Write a C program to find maximum between three numbers. [03] CO3
Q4 Write a C program to check whether a number is negative, positive or [03] CO4
zero.

Q5 Write a C program to input all sides of a triangle and check whether [03] CO5
triangle is valid or not.

Page 2 of 2

You might also like