9 Problem Solving Techniques Using C December 2019

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

No.

of Printed Pages : 2
I lllilr ilil] lil ]]t ]lil lil ilt
103 117
Gff-444
I Semester B.C.A. Examination, December - 2Ol9
(CBCS) (F+R) V2KL4\
COMPUTER SCIENCE
BCA 1O3T : Problem Solving Techniques Using C
Time : 3 Hours Max. Marks : 70

Instrttction : Anstuer all Sections.


SECTION - A
I. Answer any ten questions. LOx2=20
1. State any four important characteristics of C programming language.

2. Write the C functions used for formatted input and outpril. Give one
example of each.

3. What is the difference between break and continue statements ?

4. Write the output of the following bitwise operations assuming values of


a:5 and b: 10.
(i) anb (ii) a&b
5. Distinguish between actual arguments and formal arguments of
functions.

6. What is the ternary operator ? Give one exalnple showing the use of
this operator.
7. What is recursion ? State one advantage and one limitation of recursive
functions.

8. x:10, evaluate the following expressions


Assuming value of :

(i) x:: i0 && !x (ii) xo/o 5 * 2


g. Write the functions used. for dynamic memory a-llocation.

10. State with exarrrple any two string handling functions.


( r^'-.* -..r
11. What are preprocessor directives ? Give any two exampies. \{'"?.q. irl
L2. Differentiate between structures and unions.

P.T.O.
GN-444 2
I ffliil flil] llt ]]t ]ilt lilt ti]
SECTION . B
u. Answer any five questions. 5x1O=50
13" (a) What is software ? Write a note on classilication of software. 5
(b) Write an algorithm and flow chart to check whether an input 5
number is odd or even.

L4. (a) Explain the different types of loops available in C. b


(b) Write a C program to check whether an input number is prime or 5
not.

ls. (a) What do you understand by function prototyping ? Illustrate with b


an example.
,:, Write a recursive function to find surn of first n natural numbers 5
i.e., 1 +2+31....n.

16. (a) Explain the different storage classes. b


(b) Write a function for concatenating two strings using pointers. For b
example, S 1 : "Hello", 52 : "World", resulting string 53 : "Hello
World".

17. (a) What is an array ? Illustrate with an example how a single 5


dimensional array is declared and initialized.
(b) Write a C program to sort a single dimensional array in descending 5
order.

18. (a) What is a Structure ? How are structure variables declared and 5
initialized ? Illustrate with an example.
(b) Write a program to store details like emp-no, name and salary for 5
five employees using structures and print them.

What are the different modes for opening a file ? Write any three 5
frle operation functions in C.
Write a progr€un in C that accepts the filename and displays its b
contents.

20. (a) What are bit fields ? How can they be defined ? State the 5
advantages of bit fields.
(b) Write a program for multiplyrng two matrices. 5

-oOo-

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy