[go: up one dir, main page]

0% found this document useful (0 votes)
43 views4 pages

BPOPS103 Assignment Questions

Uploaded by

amitshah4630
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views4 pages

BPOPS103 Assignment Questions

Uploaded by

amitshah4630
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

CMR Institute of Technology, Bangalore

Department(s): Computer Science & Engineering

Semester: I Section(s): A-H Lectures/week: 04

Subject: Principles of Programming using C Code: BPOPS103

Course Instructor: Prof. Lynsha Helena Pratheeba HP, Prof.Reshma, Prof.Kavyashree,


Prof.Rjeshwari R

Course duration: Sept 2024 - Jan 2025

Assignment # 01

Date of issue:11-12-2024 | Submission Due: 31-12-2024

Course Site:

Instructions:
● ANSWER NEATLY AND LEGIBLY in the given assignment books. If assignment books are not yet
collected
● Sketch diagrams wherever relevant. Explain your notations explicitly and clearly

● An incomplete assignment or late submission will lead to deduction of marks

● Once you submit your assignment, you will be expected to answer all the questions INDEPENDENTLY.

You may be asked to answer any question of the assignment in the class

● Leave clear left margin on every page. First write the question, then followed by that write the
corresponding answer.
● On the top right corner of every page, write your Roll Number page number and
Date of submission.

Note: This question paper has to be followed by all students

Assignment 1 Questions
(Total Mark: 50)
Sl. Questions Marks CO RBT
No.

1 a. Define Computer. Explain the various types of 10 CO1 L3


Computers.
b. Explain the basic structures of C program in 10
detail. Write a simple program to demonstrate the
components in the structure of C.

2 a. Explain scanf() and printf () functions in C language 8 CO1 L3


with syntax and example.
b. What is a variable? Explain rules for constructing 6
variable in C. Give example for valid
and invalid variable.
c. Illustrate the flowchart and write a C program which 6
takes as input p, t, v and compute the simple
interest and display result.

3 a. Explain the following operators in 'C. 8 CO2 L3


b. Explain for Loop statement with syntax and example 6
program.
c. Write a C program to simulate simple calculator that 6
performs arithmetic operations using switch
statement. Error message should be displayed if any
attempt is made to divide by zero.

4 a. Explain if, if-else, nested if and cascaded if-else 8 CO2 L3


statements with syntax and example.
b. Write a C program that takes three coefficients (a, 6
b, c) to calculate roots of quadratic equation,
print all possible root with appropriate messages for
a set of coefficients.
c. Explain Break and Continue statements are used 6
to control the flow of loops in C programming.

5 a. Define function. Explain categories of user 10 CO3 L3


defined functions.
b. Define two-dimension array. Write a C program 10
to multiply 2 matrixes by ensuring their
multiplication compatibility.
CMR Institute of Technology, Bangalore

Department(s): Computer Science & Engineering

Semester: I Section(s): A-H Lectures/week: 04

Subject: Principles of Programming using C Code: BPOPS103

Course Instructor: Prof. Lynsha Helena Pratheeba HP, Prof.Reshma, Prof.Kavyashree,


Prof.Rjeshwari R

Course duration: Sept 2024 - Jan 2025

Assignment # 02

Date of issue:11-12-2024 | Submission Due: 31-12-2024

Course Site:

Instructions:
● ANSWER NEATLY AND LEGIBLY in the given assignment books. If assignment books are not yet
collected
● Sketch diagrams wherever relevant. Explain your notations explicitly and clearly

● An incomplete assignment or late submission will lead to deduction of marks

● Once you submit your assignment, you will be expected to answer all the questions INDEPENDENTLY.

You may be asked to answer any question of the assignment in the class

● Leave clear left margin on every page. First write the question, then followed by that write the
corresponding answer.
● On the top right corner of every page, write your Roll Number page number and
Date of submission.

Note: This question paper has to be followed by all students

Assignment 2 Questions
(Total Mark: 50)
a. Explain function call, function definition and function 10 CO3 L3
6 prototype with syntax and example for each.
b. Write a C Program to implement Binary Search for 5
integers.
c. What is Recursion? Write a C program to compute 5
factorial of number Using recursion.

7 a. Define string. Explain any four string manipulating 10 CO4 L3


functions with example.
b. Write a C program to concatenate two strings without 5
using built-in function strcat().
c. Explain string unformatted input/output functions 5
with example.

8 a. Define pointer. Explain pointer variable declaration 8 CO4 L3


and initialization with suitable example.
b. Explain pass by value and pass by address with 4
example.
c. Write a C program using pointers to compute sum, 8
mean, standard deviation of all elements stored
in an array of n real numbers.

9 a. Explain structure declaration and how structure 10 CO5 L3


member are accessed with Example.
b. Implement a structure to read, write and compute 10
average marks and the students scoring above
and below average of class N students.

10 a. Compare between structure and union with syntax and 6 CO5 L3


example.
b. Explain fopen( ), fclose( ), fscanf( ) and fprintf() with 10
syntax and example program considering all
above functions.
c. What are enumeration variable? How are they 4
declared?

You might also like