VELAMMAL COLLEGE OF ENGINEERING AND TECHNOLOGY, MADURAI – 625 009
Department of Computer Science and Engineering
INTERNAL ASSESSMENT - I
Branch CSE & IT Year/Sem./Sec. I/II/A,B,C
Course Code 21CS103 Date
Course Name Programming in C Max. marks 50
Course Incharge [Link], Mrs [Link],
[Link], Mr.K. Penyameen, Time 01:30 Hours
[Link] nayaki.
PART A
[Link] QUESTION K CO Marks
1 What do you meant by Keywords? List any four keywords. K1 CO1 2
1 What is a global variable? K1 CO1 2
1 List any four Preprocessor directives in C. K1 CO1 2
2 Compare ‘=’ and ‘==’ operator. K2 CO1 2
2 Compare break and continue statement in ‘C’. K2 CO1 2
2 Show the output of the following code K2 CO1 2
#include<stdio.h>
void main()
{
int a,b=3;
char c='A';
a=b+c;
printf("\na=%d",a);
}
3 What are the escape sequences present in ‘C’? K1 CO1 2
3 What is the difference between ++a and a++? K1 CO1 2
3 What is ternary operator? Give an example. K1 CO1 2
4 What is an operator and operand? Give an example. K1 CO1 2
4 Define preprocessor directives. K1 CO1 2
4 Define comment line and its types in ‘C’. K1 CO1 2
5 What is data types in ‘C’ K1 CO1 2
5 Define variable declaration with example. K1 CO1 2
5 What is the use of sizeof( ) operator? K1 CO1 2
6 Show the output of the following code K2 CO1 2
#include<stdio.h>
void main()
{
int a=2,b=3,c;
c=a-b;
printf("\n %d",c++);
}
6 Show the output of the following code. K2 CO1 2
#include<stdio.h>
void main()
{
int a=2;
a=a+3*a++;
printf("\n %d",a);}
6 Show the output of the following code. K2 CO1 2
#include<stdio.h>
void main()
{
int a=2;
a=a+3*a--;
printf("\n %d",a);
}
7 Define an Array. Give example K1 CO2 2
7 How to create a two dimensional array? K1 CO2 2
7 What are the drawbacks of Initialization of arrays in C? K1 CO2 2
8 What are the different ways of initializing array? K1 CO2 2
8 What are rules to be followed for index value? K1 CO2 2
8 Write a code to read a values for two dimensional array. K1 CO2 2
PART B
[Link] QUESTION K CO Marks
9 Describe the various types of operators in ‘C’ language and explain any 6 types of K2 CO1 13
operators with example.
9 i. Explain in detail the structure of a ‘C’ program with an example. K2 CO1 7
ii. Discuss about the various data types in ‘C’. 6
9 Explain about the various decision making and branching statements K2 CO1 13
9 Write short notes on the following with suitable examples: K2 CO1 13
i. for loop
ii. while loop
iii. do…while loop.
10 i. Write a ‘C’ program to find the maximum element of an array(67,98,45,63,89). K3 CO2 7
ii. Write a ‘C’ program for sum of elements in an array. 6
10 Explain the Two dimensional array and write a ‘C’ program to perform Matrix K3 CO2 13
multiplication .
10 i. Write a C program to count the number of Elements in the Array. CO2 13
i. Write a C program to Read N values and find and print the Average along with array K3
values.
10 Write a C program to read array elements (12,9,56,45,31,53) from the user and check K3 CO2 13
the element 56 is present or not.
PART C
[Link] QUESTION K CO Marks
11 i. Write a C program to find largest of three numbers K3 CO1 8
Write a C program to check the given year is leap or Not.
11 i. Write a C program to find the factorial of a number K3 CO1 8
Write a C Program to convert the entered Lower case letter into Upper case and vice
versa.
11 Write a C program to perform Arithmetic operations (Addition, Subtraction, K3 CO1 8
Multiplication and Division) using Switch case Statements.
11 Write a ‘C’ program to print the following pattern using looping statements. K3 CO1 8
1
12
123
1234
12345