Professional Documents
Culture Documents
Clanguage_sem1_question_paper_2023
Clanguage_sem1_question_paper_2023
TECHNOLOGY MANIPUR
End Semester
Examinations, February-2023
B. Tech First Semester WANIPU
Course Name: Computer Programming Course Code: CS1011/CS101
Date: 17/02/2023 Time: 2.00 PM to 5.00 PM
Duration: 3 hours Max. Marks: 100 marks
Answer all the questions and marks are shown at the in square
right margin bracket
PART A [2x10-20]
Q1. (i) Define high-level programming language and low-level programming language.
i) Differentiate between array and structure.
(i) Define the dynamic memory allocation.
(iv) What will be the output of the following program codes?
#include<stdio.h>
int main()
foo(p++);
void foo(int *p)
printf("%d\n", *p);
int k 5;
int *p &k
int *m= &p;
printf("%d%d%d\n", k, *p, **m);|
ITTEFRRS
INDIAN INSTITUTE OF INFORMATION TECHNOLoGY MANIPUR
End Semester Examinations, February-2023
B. Tech First Semester
inti =0;
intj = 0;
if(i> 1)
continue;
printf("Hi \n");
int x=10;
printf("%d", x);
int i = 0, j = 0;
I++
PART B
11.(a) What is pointer and pointer of a pointer? How to initialize pointers? Explain with examples.
(b) Explain the different types of control statements. [8+8=16]
12. (i) Write a progran for taking entries of hostel allotment for students with attributes (Studid, Hostel_id,
Room_no, Bed_no, Table_no, Chair_no). Program should take 5 or more entries. Display the results in
tabular format with heading as attribute names. [16
OR
(ii) Demonstrate with an example program how structure can be passed as argument and how and
structure can be returned by a function. [16]
13.()
(a) Write a program for addition of two matrices. Take input in the matrices from the user
in functions.
(6) Write a program for swapping of two numbers using function. Swapping should be done
There should not be any printing statement in the function. [8+8=16]
OR
(i) State the types of functions depending upon the categories of arguments and return statements
with an example. 16]
14.1)
(a) Differentiate between call by value and call by reference.
(b) Write a program to demonstrate the use of string functions. 18+816
OR
an array using two pointer. One pointer may demonstrate
(ii) program to access the values in
Write a
without changing the position and another by changing the positions.
[16]