Exam Details
Subject | c-programming for problem solving | |
Paper | paper 1 | |
Exam / Course | b.tech | |
Department | ||
Organization | Visvesvaraya Technological University | |
Position | ||
Exam Date | 2018 | |
City, State | karnataka, belagavi |
Question Paper
Model Question Paper
I/II Semester
C-PROGRAMMING FOR PROBLEM SOLVING (18CPS13/23)
Time: 3 hrs. Max. Marks: 100
Note: Answer any FIVE full questions, choosing one full question from each module.
MODULE 1
1 a Explain different types of computer. (6Marks)
b What is Software? Explain different types of software. Marks)
c With a neat diagram explain the basic structure of a computer Marks)
OR
2 a Explain a general structure of C program with an example. 8 Marks)
b What is a token? What are different types of tokens available in C
language? Explain.
8 Marks)
c Evaluate the following expressions:
22 3 6 22 22 2
ii) a 2 b a d 2 e Where d
7 and e=5.
4 Marks)
MODULE 2
3. a Explain formatted input and output statement with examples. Marks)
b
Explain if, if-else, nested if-else and cascaded if-else with examples and
syntax.
8 Marks)
c
An electricity board charges the following rates for the use of
electricity: for the first 200 units 80 paise per unit: for the next 100
units 90 paise per unit: beyond 300 units Rs 1 per unit. All users are
charged a minimum of Rs. 100 as meter charge. If the total amount is
more than Rs 400, then an additional surcharge of 15% of total amount
is charged. Write a program to read the name of the user, number of
units consumed and print out the charges.
6 Marks)
OR
4 a Explain the different types of loops in C with syntax. Marks)
b Show how break and continue statements are used in a C-program, with
example.
Marks)
c Develop a C program to generate and plot the Pascal triangle. Marks)
MODULE 3
5 a What is an array? How a single dimension and two dimension arrays
are declared and initialized?
(12 Marks)
b Write an algorithm and develop a C program that reads N integer
numbers and arrange them in ascending order using selection Sort.
(08 Marks)
OR
6 a Explain string manipulation library functions with their syntaxes. Write
a program to check whether a string is palindrome or not.
12 Marks)
b Write an algorithm and develop a C program to search an integer from
N numbers in ascending order using binary searching technique
Marks)
MODULE 4
7. a What is function? Explain different classification of user defined
functions based on parameter passing and return type with examples
(12 Marks)
b Write a c-program using functions to generate the Fibonacci series. Marks)
OR
8 a What is recursion? Explain. Write a c-program using recursive function
for Binary to Decimal Conversion.
(10 Marks)
b Write a program in C using functions to swap two numbers using
global variables concept and call by reference concept.
Marks)
c Write a c-program using function to check whether the given number is
prime or not.
Marks)
MODULE 5
9 a What is structure? Explain C syntax of structure declaration with
example.
Marks)
b Explain structure within a structure with an example. Marks)
c Write a c-program using structures to read, write, compute average
marks and display the students scoring above and below the average
marks for a class of N students.
8 Marks)
OR
10 a What is a pointer? Explain how the pointer variable declared and
initialized.
4 Marks)
b Write a program in C to find the sum and mean of all elements in an
array using pointers.
6 Marks)
c Explain different categories of pre-processor directives used in C. (10 Marks)
I/II Semester
C-PROGRAMMING FOR PROBLEM SOLVING (18CPS13/23)
Time: 3 hrs. Max. Marks: 100
Note: Answer any FIVE full questions, choosing one full question from each module.
MODULE 1
1 a Explain different types of computer. (6Marks)
b What is Software? Explain different types of software. Marks)
c With a neat diagram explain the basic structure of a computer Marks)
OR
2 a Explain a general structure of C program with an example. 8 Marks)
b What is a token? What are different types of tokens available in C
language? Explain.
8 Marks)
c Evaluate the following expressions:
22 3 6 22 22 2
ii) a 2 b a d 2 e Where d
7 and e=5.
4 Marks)
MODULE 2
3. a Explain formatted input and output statement with examples. Marks)
b
Explain if, if-else, nested if-else and cascaded if-else with examples and
syntax.
8 Marks)
c
An electricity board charges the following rates for the use of
electricity: for the first 200 units 80 paise per unit: for the next 100
units 90 paise per unit: beyond 300 units Rs 1 per unit. All users are
charged a minimum of Rs. 100 as meter charge. If the total amount is
more than Rs 400, then an additional surcharge of 15% of total amount
is charged. Write a program to read the name of the user, number of
units consumed and print out the charges.
6 Marks)
OR
4 a Explain the different types of loops in C with syntax. Marks)
b Show how break and continue statements are used in a C-program, with
example.
Marks)
c Develop a C program to generate and plot the Pascal triangle. Marks)
MODULE 3
5 a What is an array? How a single dimension and two dimension arrays
are declared and initialized?
(12 Marks)
b Write an algorithm and develop a C program that reads N integer
numbers and arrange them in ascending order using selection Sort.
(08 Marks)
OR
6 a Explain string manipulation library functions with their syntaxes. Write
a program to check whether a string is palindrome or not.
12 Marks)
b Write an algorithm and develop a C program to search an integer from
N numbers in ascending order using binary searching technique
Marks)
MODULE 4
7. a What is function? Explain different classification of user defined
functions based on parameter passing and return type with examples
(12 Marks)
b Write a c-program using functions to generate the Fibonacci series. Marks)
OR
8 a What is recursion? Explain. Write a c-program using recursive function
for Binary to Decimal Conversion.
(10 Marks)
b Write a program in C using functions to swap two numbers using
global variables concept and call by reference concept.
Marks)
c Write a c-program using function to check whether the given number is
prime or not.
Marks)
MODULE 5
9 a What is structure? Explain C syntax of structure declaration with
example.
Marks)
b Explain structure within a structure with an example. Marks)
c Write a c-program using structures to read, write, compute average
marks and display the students scoring above and below the average
marks for a class of N students.
8 Marks)
OR
10 a What is a pointer? Explain how the pointer variable declared and
initialized.
4 Marks)
b Write a program in C to find the sum and mean of all elements in an
array using pointers.
6 Marks)
c Explain different categories of pre-processor directives used in C. (10 Marks)
Other Question Papers
Subjects
- additional mathematics – ii
- additional mathematics-i
- advanced calculus and numerical methods
- alternative building materials
- analog and digital communication systems
- analog electronic circuits
- analog electronics
- automobile engineering
- automotive electronics
- basic electrical engineering
- basic electronics i & ii
- c-programming for problem solving
- calculus and linear algebra
- clinical instrumentation – ii
- computer integrated manufacturing
- constitution of india, professional ethics and human rights
- construction management and entrepreneurship
- control engineering
- design for manufacturing
- design of machine elements
- design of steel structural elements
- digital electronics
- digital system design
- electric circuit analysis
- electrical and electronic measurements
- electronic instrumentation
- elements of civil engineering and mechanics
- elements of mechanical engineering
- embedded system design and programming
- energy auditing
- energy engineering
- engineering chemistry
- engineering electromagnetics
- engineering graphics
- engineering mathematics – iv
- engineering mathematics-i
- engineering mathematics-ii
- engineering mathematics-iii
- engineering physics
- environmental protection and management
- finite element method
- finite element method of analysis
- fluid power systems
- heat transfer
- high voltage engineering
- highway engineering
- integration of distributed generation
- kannada kali
- kannada mansu
- machine learning
- matrix method of structural analysis
- mechatronics
- metal forming
- mobile communication
- network analysis
- numerical methods and applications
- oops with c++
- power and industrial electronics
- power system analysis 2
- power system protection
- smart materials & mems
- software application lab
- solid waste management
- technical english – 1
- total quality management
- transformers and generators
- tribology
- water resources management
- water supply and treatment engineering