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

CS3251 1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 3

QUESTION PAPER CODE:50895

B.E/B.TECH.DEGREE EXAMINATIONS,APRIL/MAY2024
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-(10x2 = 20 marke)
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;
}

3. What is the output of the following code


int main()
{
int a[4]={1, 2, 3, 4);
B++;
printf("%d", *a);
return 0;
}
4 What will be the value of var for the following String Operations statement in C language?
var strcmp ("Hello", "World");
5. How the pow() function is defined and which header file provides it?
6. Differentiate pass by reference and pass by value in C.
7. How the nested structure can define in C, explain with syntax and example?
8. What will be the output of the following C code?
#include<stdio.h>
main()
typedef int a;
ab2,c8, d;
d=(b2)/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-(5x16=80 marks)
11. (a) (i) Discuss the structure of C program in detail and explain with simple hello world
program. (8)
(ii) Explain the terms variables and constants. How many types of variables are supported by
C. (8)
Or
(b) (6) What is purpose of Decision Control Statements in C? Explain any two of such types
with the general form of simple statements. (8)
(ii) What are the functionalities of Preprocessor and Compiler? Explain with a
simple example. (8)
12. (a)(1) 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) (1) 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) (1) 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)

You might also like