Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

CIE QUESTION PAPER UG

ಗ್ಲೋಬಲ್ ಅಕಾಡೆಮಿ ಆಫ್ ಟೆಕ್ನಾಲಜಿ, ಬೆಂಗಳೂರು


Global Academy of Technology , Bengaluru
Department of Computer Science &Engineering Internal Test No: 1

Date 1 8 1 1 2 3 Semester 1st USN

Subject
Name
C Programming (Integrated) Subject Code 2 3 E S C 1 4 C

Time:75 Mins Note: Answer all full questions. Max. Marks: 40


Q.
Questions Marks
No.

5 Marks for basic structure


1 10
5 Marks for explanation

Define tokens in C. Write and explain the different types of tokens with examples.

2 Marks for definition


2 10
4 Marks for explaining different tokens

4 Marks for example

Write a C program to perform swapping of two numbers using i) Arithmetic operator ii) Bitwise
operator iii) Using Temp variable

3 Marks for Arithmetic Operator


3
3 Marks for Bitwise Operator

4 Marks for Temp variable


10
Write a C program, algorithm and draw a flowchart to compute simple interest.

3 Marks for algorithm


4
3 Marks for flowchat
10
4 Marks for Program

5 Evaluate the following expressions in detail:


i) b= a++ + a++ + a++ where a=4
ii) a + = b * = c - =5 where a=3, b=5 and c=8
iii) int a= -1, b= -a ; res= (a>0)||(b>=0)&&(a>=0)||(b<=0)
iv) int i=4; res = i++ * i++ ;
v) int a=5,b= 10,c=5, res; res= a<b<c; print(“%d”, res);

2 Marks for each expression

10
List the rules for naming a variable in C. Which of the following are invalid variable names and
why?

1)Maximum 2) first.name 3) n1+n2 4) &nam 5) double 6) 3rd_row 7) n$

8) Row1 9) Sum total 10) doubles


6
5 Marks for rules 10

5 Marks for finding an invalid 0r Valid variable names.

Write a C program to input 3 numbers and find the smallest among them using a nested if-else
statement.

7 5 Marks for logic 10

5 Marks for program

Explain the working of the else if ladder statement with syntax and examples.

2 Marks for definition


8 10
4 Marks for syntax

4 Marks for example

Signature of Course Coordinator Signature of Module Coordinator Signature of HOD

You might also like