0% found this document useful (0 votes)
21 views

PSTC (1st) Dec2018

Uploaded by

masadakmal6
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

PSTC (1st) Dec2018

Uploaded by

masadakmal6
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Bachelor of Computer Applications 1st Semester

PROBLEM SOLVING THROUGH C


Time Allowed : 3 Hours Maximum Marks : 65
Note: Attempt five questions in all, selecting one question each from Units 1, II, III and IV. Unit -V is
compulsory.

UNIT-I
1. (a) What is a flowchart ? Draw a flowchart to find out total number of students in a class who 7
have scored more than 60%.
(b) What is a constant ? Discuss different types of constants used in C language. 6
2. (a) Discuss the structure of a C program with the help of an example program.
(b) Discuss various arithmetic and assignment operators available in C language. Give
appropriate examples.
3. (a) Discuss various looping statements used in C language
(b) What are the different ways to pass parameters to a function? Explain with the help of
examples.
4. (a) How to use switch, break and continue statements in a program ? Give example code.
(b) Define a function to print ith Fibonacci where term i is passed as argument to the function.

o m
Use this function to print first n Fibonacci terms.
UNIT-III
5.
.r c
(a) Write a program to find greatest element in each row of a two dimensional array
(b) How to declare an array (single and double dimensional)? How to access individual values

example code.
p e
in an array ? How to initialize an array during compile time and run time? Give appropriate

m
a o
p .r c
6. (a) What is a pointer ? How to use pointers with double dimensional array ? Write a program to

b r
print all the elements of a two-dimensional array using pointers.

e
(b) How to allocate memory dynamically ? Discuss various functions used.

7.
UNIT-IV

a p
(a) Discuss the following string handling functions with the help of example code:
(i) strcat()
(ii) strcmp()
r p
(iii) strcpy()
b
(b) Write a program to copy a string from one character array to another without using any
built-in string handling function.
8. (a) How to use array of structures ? Explain with the help of an example code.
(b) How to create, cpen and close a file in a C program ? Discuss various functions used to
write into a file.
(Compulsory Question)
9. (a) Differentiate between local and global variables.
(b) What are Data Flow Diagrams? Give example
(c) What logical operators are available in C language ?
(d) What is a Union ? Give example
(e) How are structures different from arrays
(f) What is the use of static storage class?

You might also like