0% found this document useful (0 votes)
7 views3 pages

Engineering king_CS3251 April 2024

This document is a question paper for the B.E./B.Tech. degree examinations in Computer Science and Engineering, specifically for the Programming in C course. It includes various questions divided into two parts, covering topics such as C language keywords, decision control statements, arrays, functions, memory allocation, and file organization. The exam is scheduled for April/May 2024 and is designed for students in their second semester.

Uploaded by

ridermonster420
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)
7 views3 pages

Engineering king_CS3251 April 2024

This document is a question paper for the B.E./B.Tech. degree examinations in Computer Science and Engineering, specifically for the Programming in C course. It includes various questions divided into two parts, covering topics such as C language keywords, decision control statements, arrays, functions, memory allocation, and file organization. The exam is scheduled for April/May 2024 and is designed for students in their second semester.

Uploaded by

ridermonster420
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/ 3

Reg. No.

Question Paper Code : 50895


B.E./B.Tech. DEGREE EXAMINATIONS, APRILMAY 2024

Second Semester

Computer Science and Engineering


CS 3251- PROGRAMMING IN C

(Common to: Computer Science and Engineering (Artificial Intelligence and


Machine Learning)/ Computer Science and Engineering (Cyber Security)/ Computer
and Communication Engineering/ Information Technology)
(Regulations 2021)
[Also common to PTCS 3251 - Programming in C for B.E. (Part-Time)
Second Semester -Computer Science and Engineering - Regulations-2023]
Time:Three hours Maximum: 100 marks
Answer ALL questions.
PART A -(10 x 2= 20 marks)
1. List at least any ten keywords in C language.
2. What is the output of the following program?
#include <stdio.h>
int main)

int i;
i=1,2, 3;
printf ("%d", i);
return 0;

What is the output of the following code


int main)

int a[4] = {1, 2, 3, 4};


a++;
printf("%d", *a);
return 0;
4 What will be the value of var for the following String Operations statement in
Clanguage?
var = strcmp ("Hello", "World"):
it?
5 How the pow) function is defined and which header file provides

6 Differentiate pass by reference and pass value in C.

example?
7 How the nested structure can define in C, explain with syntax and

8 What will be the output of the following C code?


#include<stdio. h>

main)

typedef int a;
ab=2, c=8, d;
d= (b* 2) /2 +8;
printf ("%d", d);

9. What is the typedef function in C?

10. List the properties of Command-Line arguments in C.

PART B-(5 x 16 = 80 marks)

explain with
11. (a) (i) Discuss the structure of C program in detail and
(8)
simple hello world program.
types of
(ii) Explain the terms variables and constants. How many
variables are supported by C. (8)

Or

Explain any
(b) ) What is purpose of Decision Control Statements in C?
such types with the general form of simple statements. (8)
two of
Explain
What are the functionalities of Preprocessor and Compiler?
(8)
with a simple example.
2 50895
12 (a) (i) Compare one dimensional and two dimensional array. Explain the
use of multi-dimensional arrays with syntax and example. (10)
(ii) Explain the four string functions with suitable examples. (6)

Or

(b) (i) Write an algorithm to sort an array of integers in ascending order


using selection sort and find its time complexity. (10)
(ii) Write a simple binary search program using an iterative method.
(6)

13. a) (i) Write different types of functions with respect to return type
arguments and explain all types with syntax and example. (10)
(ii) Explain the header file that contains various methods for
performing mathematical operations. (6)

Or

(b) ) Discuss call by value and call by reference with some simple
program. (10)

(ii) What is a recursive function? Write a simple binary search


algorithm using recursive functions. (6)

14. (a) Explain in detail about the dynamic memory allocation process and list
memory allocation/deallocation functions. (16)
Or

(b) Discuss the concepts, advantages of self-referential structures and its


types and explain with an example program. (16)

15. (a) What is File Organization? Explain its types with pros and cons. (16)

Or

(b) (i) What is a File and list any five operations that can be performed on
a file. (8)
(ii) What are command line arguments in C? Explain with a suitable
program. (8)

3 50895

You might also like