100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

Basic function of c (Cs3101)

Rating
-
Sold
-
Pages
6
Grade
A
Uploaded on
09-01-2025
Written in
2024/2025

Document in a esay to study










Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
January 9, 2025
Number of pages
6
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Content preview

S.A.ENGINEERING COLLEGE, CHENNAI-77.
(An Autonomous Institution, Affiliated to Anna University)
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

QUESTION BANK

Academic Year : 2024-2025 (ODD)
Year/ Sem : I/I
Subject Code : CS3101A
Subject Name : PROGRAMMING FOR PROBLEM SOLVING USING C
Common to : All B.E/B.Tech



UNIT I - INTRODUCTION TO PROGRAMMING AND BASICS OF C PROGRAMMING
Introduction to programming paradigms. Introduction to components of a computer system, Idea and
Representation of Algorithm, From algorithms to programs. Introduction to C, C Programming: Tokens,
Identifiers, Keywords, Data Types, Variables, Constants, Input/ Output statements, C Operators,
Expressions, Type conversion. Control structures: Decision-making statements, Looping statements, Switch
case, Break, Continue, goto statements.
PART – A
Q.No Questions CO BT Competence
1. Recall the definition of an algorithm in programming. CO1 BTL-1 Remember
2. List the basic components of a computer system. CO1 BTL-1 Remember
3. List the data types available in C programming. CO1 BTL-1 Remember
4. What is a variable in C programming? CO1 BTL-1 Remember
5. What is the purpose of the 'return' statement in C? CO1 BTL-1 Remember
6. Illustrate how tokens are used to form statements and CO1 BTL-2 Understand
expressions in C.
7. Define the term 'identifier' in the context of C programming. CO1 BTL-1 Remember
8. Summarize the usage of break and continue statements in C CO1 BTL-2 Understand
programming.
9. What is type conversion in C and what are the types? CO1 BTL-1 Remember
10. Write an example of a conditional statement in C programming. CO1 BTL-1 Remember
PART – B & C
1. Apply the steps of a simple algorithm using a flowchart or CO1 BTL-3 Apply
pseudocode for the following.
(i) Find the maximum of three numbers.
(ii)Check if a given number is prime.
2. Demonstrate how to declare variables of different data types in CO1 BTL-3 Apply
a C program.
3. Examine the use of switch-case constructs in C with an example CO1 BTL-3 Apply
program. Compare how nested if statements differ from switch
statements in terms of readability and performance.

, 4. Build a diagram to illustrate the process of program execution, CO1 BTL-3 Apply
highlighting the interaction of various components such as
compilation, linking, and runtime. Explain each component’s
role in the execution process.
5. Compare the use of scanf() and printf() functions with other CO1 BTL-4 Analyze
input/output methods in C. Discuss their advantages and
limitations in different scenarios.
6. Dissect the functionality and use cases of different types of CO1 BTL-4 Analyze
operators in C. Examine how operator precedence and
associativity affect the evaluation of expressions involving
these operators.
7. Apply a C program that uses loops to demonstrate where CO1 BTL-3 Apply
different loop statements (for, while, do-while) might be used.
Show examples for each type of loop.
8. Explore the use of decision-making statements in C. Write a CO1 BTL-3 Apply
program to determine whether a given number is positive,
negative, or zero using if, else if, and else statements.

UNIT II - ARRAYS AND STRINGS
Introduction to Arrays. One dimensional array: Declaration, Initialization, Accessing the elements, Bubble sort,
Selection sort, Linear search, Binary search. Two-dimensional arrays: Declaration, Initialization, Accessing
the elements, Matrix Operations (Addition, Scaling, Multiplication, Transpose). Strings: Reading, Writing,
String handling functions, String Arrays.
PART – A
Q.No Questions CO BT Competence
1. Define an array in C programming. CO2 BTL-1 Remember
2. Infer how to access the elements of an array using a loop. CO2 BTL-2 Understand
3. Outline the purpose of the bubble sort algorithm. CO2 BTL-2 Understand
4. How to initialize a one-dimensional array in C? CO2 BTL-2 Understand
5. What is the difference between a one-dimensional and multi- CO2 BTL-1 Remember
dimensional array?
6. IIlustrate the use of the strlen( ) in C. CO2 BTL-2 Understand
7. What is a character array? How is it different from a string? CO2 BTL-1 Remember
8. How do you convert a string to an integer in c? CO2 BTL-2 Understand
9. What is a string in C programming? CO2 BTL-1 Remember
10. Summarize the purpose of the strcmp ( ) in C. CO2 BTL-2 Understand
PART – B & C
1. Develop a program that demonstrates declaring an array, initializing CO2 BTL-3 Apply
it with values, and accessing those values using a loop. Write a
program to find the largest and smallest element in an array.
2. Develop a C program that implements the bubble sort algorithm. CO2 BTL-3 Apply
Given an integer array, sort it in ascending order using bubble sort.
After sorting, print the sorted array. Ensure the program handles
arrays of various sizes and values.
£35.66
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
kaviarasu240407

Get to know the seller

Seller avatar
kaviarasu240407
View profile
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
11 months
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions