Programming with C QUESTION PAPER Format computer science engineering diploma 3rd semester

FORMAT OF I A TEST QUESTION PAPER (CIE) computer science engineering diploma 3rd semester

Test/Date and Time

Semester/year

Course/Course Code

Max Marks

Ex: I test/6 th weak of sem 10-11 Am

I/II SEM

 

 

20

Year:

 

Name of Course coordinator :                                                                                                                 Units:  

CO’s:        

Question

no

Question

MARKS

CL

CO

PO

1

 

 

 

 

 

2

 

 

 

 

 

3

 

 

 

 

 

4

 

 

 

 

 


4
Note: Internal Choice may be given in each CO at the same cognitive level (CL).

MODEL QUESTION PAPER (CIE)

Test/Date and Time

Semester/year

Course/Course Code

Max Marks

Ex: I test/6 th weak of sem 10-11 AM

III SEM

Programming with C

 

20

Year: 2015-16

Course code:15CS31T

Name of Course coordinator :

Units:1,2 Co: 1,2

Note: Answer all questions

Questio n no

Question

CL

C O

PO

1

What is variable? Write the rules and guidelines for naming variable? (5)

OR

Evaluate the expression (a + b) * (c + d) + e – f/g*h + 3.25, where a=5, b=3, c=-2, d=7, e=1, f=6, g=8, h=1

R

1

1,2

2

Define algorithm? Explain its characteristics                                                                        (5)

OR

Write a flow chart and C program to find the sum and average of three numbers

U A

1

1,2

3

Give the general syntax and an example of do.....while loop statement.

Why it is called as "exit-controlled" loop?                                                                        (5)

U

2

1,2

4

Explain printf() statement with an example.

A

2

1,2



 Format for Student Activity Assessment

DIMENSION

Unsatisfactory 1

Developing 2

Satisfactory 3

Good 4

Exemplary 5

Score

Collection of data

Does not collect any information relating to the topic

Collects very limited information; some relate to the topic

Collects some basic information; refer to the topic

Collects relevant information; concerned to the topic

Collects a great deal of information; all refer to the topic

3

Fulfill team’s roles & duties

Does not perform any duties assigned to the team role

Performs very little duties

Performs nearly all duties

Performs all duties

Performs all duties of assigned team roles with presentation

4

Shares work equally

Always relies on others to do the work

Rarely does the assigned work; often needs reminding

Usually does the assigned work; rarely needs reminding

Does the assigned job without having to be reminded.

Always does the assigned work without having to be reminded and on

given time frame

3

Listen to other Team mates

Is always talking; never allows anyone else to speak

Usually does most of the talking; rarely allows others to speak

Listens, but sometimes talk too much

Listens and contributes to the relevant topic

Listens and contributes precisely to the relevant topic and exhibit leadership qualities

3

 

 

 

TOTAL

13/4=3.25=4


*All student activities should be done in a group of 4-5 students with a team leader.


 
Diploma in Computer science & Enginnering
III- Semester
Course Title: Programming with C
Time: 3 Hours Max Marks: 100
PART-A
Answer any SIX   questions. Each carries 5 marks. 5X6=30 Marks

1) What is a variable? Write the rules and guidelines for naming variable?
2) Explain scanf() statement with an example
3) Compare while and do. while statement.
4) Explain  Relational and Logical operators
5) Write a short note on C library functions
6) What are the advantages of functions?
7) List string handling functions.
8) Define a structure. Give general syntax of a structure. Explain with an example.
9) Compare array versus structures.

PART-B
Answer any SEVEN full  questions each carries 10 marks. 10X7=70 Marks
1. Explain the data types of C language
2. Write a C program to swap the values of two variables without using third variable
3. Explain the switch statement with syntax with an example.
4. Write a program to find the sum of n natural numbers.
5. Explain If. else statements with an example.
6. Explain the following:
i. Passing argument to a function
ii. Returning value from a function
7. a) List the advantages and disadvantages of an array.
b) What is an array? How are arrays declared and initialized?
8. Write a program to find the transpose of a matrix.

9. Explain the following function with an example:
 
i. getchar() ii. strrev() iii. strcmp() iv. strcat() v.  strcpy()
10. Write a program to create structure with an employee details & display the same.

MODEL QUESTION BANK
Diploma in Computer Science & Engineering III Semester
  Course Title: Programming with C

CO

Question

CL

Marks

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I

What is a token? Give example for each type of token.

R

 

 

 

 

 

 

 

05

What is a constant? Explain different types of C constants.

R

What is variable? Write the rules and guidelines for naming variable?

R

Define the term Identifier. Give an example.

R

List the basic data types with byte specification

U

List the hierarchy (precedence ) rules of arithmetic operators.

U

Evaluate the expression   2 + 1 * 3 - 4 % 3 * 1 + 16 / 2 % 5    and smilar

type expressions to be solved having arithmetic, relational and logical operators also

U

List the important features of C language.

U

Give a general form of ternary operator, Explain with an example.

A

Explain simple assignments in C. Give an example.

U

List input and output functions

U

Explain printf() statement with an example.

A

Explain scanf() statement with an example.

A

Define algorithm? Explain its characteristics

U

Define flow chart? List the symbols used in flow-chart

U

Write a algorithm and C program to find the sum and average of three

numbers

A

With general syntax explain formatted input-output statements. Give

example for each.

U

 

 

 

 

 

 

 

 

 

10

Define the following with an example:

i.     Increment Operator.           ii. Decrement Operator

U

1.    Explain the basic data types of C language.

U

Define the following with an example:

i.     C Keyword.                         ii.    Variable.

iii.  Constants.                              iv. Format Specifier

v. Arithmetic Expression.

U

Define the following terms. Give one example each.

i.      Constant.                            ii.      Keyword.

iii.   Relational Expression.      iv.     Assignment statement.

U

 

v. Conditional operator.

 

 

Write a flow chart and C program to swap the values of two variables

without using third variable.

A

Explain the basic structure of C program.

U

Write an algorithm and C program to find the largest of three numbers

using conditional operators.

A

Write an algorithm and flow chart to compute sum of n numbers

A

Write an algorithm and C program to find area and circumference of a circle (circum=2πr and Area= πr2

A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

II

Explain different logical operators with examples.

U

 

 

 

 

 

 

 

05

Explain different relational operators with examples.

U

Write the general syntax of if & if-else statement.

U

Compare while and do... while statement.

U

Compare if and if-else statement.

U

Illustrate and explain nested if –else statement.

U

state and explain if –else ladder statement.

U

Write a program to find the largest of three numbers.

A

With general syntax, explain the significance of break and continue

statement in loops..

U

Define the following

i.    break.

ii.    goto.and label

iii.    continue.

U

List and explain any two unconditional statements/jumping statements.

U

Explain Relational and Logical operators.

U

With general syntax, explain the need of break statement in Switch.

U

Give the general syntax and an example of do........................................................................ while loop statement.

Why it is called as "exit-controlled" loop?

U

Differentiate between break and continue statements.

U

Write a C program to check whether the given number is odd or even.

A

Explain the logical operators with example.

U

Explain relational operators with example.

U

Explain for statement with an example.

U

Explain If..... else statements with an example.

A

 

 

 

 

 

 

 

 

10

Explain nested for loop with the general syntax.

U

Write a program to find roots of quadratic equation using switch

statement.

A

Explain the switch statement with syntax, with an example.

A

Explain entry controlled and exit controlled loop with an example.

A

Write a program to find the numbers and sum of all numbers greater

than 150 and less than 250 which are divisible by 8.

A

Write a program to find the largest of 3 numbers using if........................................................................ else

statement.

A

Write a program to find smallest of three numbers using nested if........................................................................ else

statement.

A

Write a program to check whether the given number is prime or not.

A

 

Write a program to generate Fibonacci series.

A

 

Write a program to find the sum of n natural numbers.

A

Write a program to find the reverse of a given numbers.

A

Write a program to count even and odd from n natural numbers.

A

 

 

 

 

 

 

 

III

Define function. List different types of functions.

U

 

 

 

 

 

 

05

What are the advantages of functions?

U

List the difference between actual parameters and formal Parameters.

U

Explain scope and lifetime of a variable in a function.

U

What do you mean by user defined function? Explain.

U

Write a short note on C library functions.

U

Write a user defined function great() that computes greatest of two

numbers and return the largest number to function main().

A

Write the block structure of a function.

U

Define the following

1. Formal parameter

2. Actual parameter

3. Return type

4. Function call

U

What is a function prototype give an example.

U

Write a program to find the factorial of a given number using function.

A

 

 

 

10

Write a program to find the GCD of a given number using function.

A

Explain Call by Value with an example.

U

Explain the following with a example:

i.         Passing argument to a function

ii.          Returning value from a function

A

 

 

 

 

 

 

 

 

 

 

IV

What is an array? Explain how to declare and initialize a single

dimension array?

U

 

 

 

 

 

 

 

05

With an example, explain declaration & initialization of two

dimensional array.

U

Compare one dimensional array with two dimensional array.

U

Explain multidimensional array with an example.

A

Write an algorithm to search a given key in the array of elements.

A

Discuss one dimensional array with example.

U

Explain different operations on arrays.

U

Write a program in C to store 25 elements (integers) in two-dimensional array called "temp" in 5-rows and 5-columns. The program should also

display these numbers in a matrix format.

A

Write a program to transpose the given matrix.

A

List the advantages and disadvantages of an array.

U

Write a C program to find the sum of principle diagonal elements of a

matrix.

A

Write a program to search an element in an array.

A

 

Write a program to find the sum and number of positive numbers and

negative numbers in an array

A

Write a program to sort 'N' elements of an array using simple sort.

A

Define the following:

a. Array                    b. Searching                                  c. Sorting

U

 

Write a program to find the sum of two matrices.

A

10

Write a C function to compute trace and norm of a matrix.

A

Write C function to compute largest of N numbers.

A

 

 

 

 

 

 

 

V

Define string. How to Declare & Initialize string variables with an

example.

U

 

 

 

 

 

 

 

 

05

Write a program to concatenate two strings using in-built string

function.

A

Explain how to read the string from the terminal and write a string to the

terminal with an example.

U

Explain with an example the Null-terminated strings as "Array of

Characters".

U

Write a C program to check whether the given string is a palindrome or

not.

A

List string handling functions.

U

Write a program to compare any two strings using string functions

A

List the advantages of preprocessor directives.

A

Explain briefly how to use #define directive.

A

Write a short note on File inclusion.

U

Explain with Example the #include preprocessor directive.

A

How do you define symbolic constants? Illustrate with an example

A

Explain the following function with an example:

i.  getchar()                       ii. strrev()

iii. strcmp()                       iv. strcat()

v. strcpy()

U

10

Define a macro. Explain macro substitution with an example.

U

Define string. Give an example. Explain the various string handling functions with an example.

U

Write a C program to verify that the given string is palindrome or not

using iterative method.

A

Write a program to find the area of a circle using macros.

A

Write a note on the following:

a.     Pre-processor directive

b.     Macro substitution

 

U

 

 

 

 

 

 

VI

Define a structure. Explain with an example, the general syntax of a

structure.

U

5

What are structure variables? Explain how to declare and initialize a

structure variable.

U

Define a union. Explain with an example, the general syntax of a union.

U

List the difference between Union and Structure.

U

Compare Arrays versus Structures.

U

Define array of structure. Give an example.

U

Explain array variable as a structure member with an example.

U

Explain array of structure with an example.

U

10

Explain the need of structure within a structure (nested structure) with

an example

U

 

Write a program to read 'N' student information and display it.

A

 

Write a program to create structure with an employee details & display

the same

A


Comments

Popular posts from this blog

New Regime Income Tax Calculator 2025-2026

Expense Tracker

Percentage Calculator