VTU First Year Engineering (C Cycle) (Semester 2)
Programming in C and Data Structures
January 2013
Total marks: --
Total time: --
INSTRUCTIONS
(1) Assume appropriate data and state your reasons
(2) Marks are given to the right of every question
(3) Draw neat diagrams wherever necessary


1 (a) (i) Which of the following is not an input device.
a) plotter
b) scanner
c) keyboard
d) mouse
1 M
1 (a) (ii) Conversion of single program to M/C language is done by
a) linker
b) compiler
c) editor
d) OS
1 M
1 (a) (iii) Computer is controlled by _____
a) Hardware
b) Software
c) Instructions
d) Statement
1 M
1 (a) (iv) Computer converts data into _____
a) Information
b) Charts
c) I/P, O/P
d) Software
1 M
1 (b) Explain the basic structures of a computer, with a neat diagram.
6 M
1 (c) Explain the following input devices:
i) Pen based input devices
ii) Optical input devices
6 M
1 (d) Explain information processing cycle.
4 M

Choose the correct answer_id:
2 (a) (i) DOS is an example of _____ interface.
a) Command line
b) Check box
c) Graphical
d) Parallel
1 M
2 (a) (ii) Email is a system for exchanging message through a _____
a) client
b) program
c) Network
d) back bone
1 M
2 (a) (iii) Every webpage has a unique address, called a
a) Hyperlink
b) URL
c) HTTP
d) www
1 M
2 (a) (iv) In a _____ n/w all devices are connected to a hub
a) bus
b) star
c) ring
d) mesh
1 M
2 (b) Define operating system. What are the functions of operating systems?
6 M
2 (c) Explain the following storage devices:
i) Hard disk
ii) Compact disk
6 M
2 (d) Explain the characteristics of network.
4 M

Choose the correct answer_id:
3 (a) (i) C' is what kind of language?
a) Machine
b) Procedural
c) Assembly
d) Object Oriented programming
1 M
3 (a) (ii) The hexadecimal constant is preceeded by:
a) OX
b) O
c) HX
d) H
1 M
3 (a) (iii) The number 025 is _____ number.
a) Decimal
b) Octal
c) Hexa
d) Binary
1 M
3 (a) (iv) The operator % yields
a) Quotient
b) Remainder
c) Percentage
d) Fractional part
1 M
3 (b) Briefly explain how to create and run the porgram.
4 M
3 (c) Explain 5-types of data with its range valve.
6 M
3 (d) Explain formatted input and output functions.
6 M

Choose the correct answer_id:
4 (a) (i) What is the size of character in bytes?
a) 1
b) 2
c) 3
d) 4
1 M
4 (a) (ii) Puts is _____ function
a) i/p
b) o/p
c) input output
d) None
1 M
4 (a) (iii) The conversion specifier _____ is used to represent string
a) %d
b) %c
c) %f
d)%s
1 M
4 (a) (iv) Keywords are _____
a) Identifier
b) Reserved words
c) Variable
d) None
1 M
4 (b) What do you mean by type conversion? Explain explicit type conversion with examples.
4 M
4 (c) Explain the following operators with examples:
i) Conditional
ii) Size of
iii) Bitwise
9 M
4 (d) Determine the value of each of the following logical expressions, where a = 5, b = 10 and c = -6.
i) a>b && a>c
ii) b>15 && c<0 || a>0
iii) (a/2.0 == 0.0 && b/2.0|=0.0) || c<0.0
3 M

Choose the correct answer_id:
5 (a) (i) The default return type of a function is _____
a) int
b) float
c) char
d) double
1 M
5 (a) (ii) How many values returned by functions by default
a) ONE
b) TWO
c) THREE
d) FOUR
1 M
5 (a) (iii) Which is not a variable storage class
a) Automatic
b) Extern
c) Static
d) Dynamic
1 M
5 (a) (iv) Which keyword is used to declare external variable
a) external
b) extern
c) auto extern
d) None
1 M
5 (b) Explain the elements of user defined functions.
6 M
5 (c) Write a function prime that returns 1, if its argument is a prime number and returns 0. Otherwise. Using the same function, write a program to check whether the number is prime or not.
5 M
5 (d) Write a note on parameter passing techniques.
5 M

Choose the correct answer_id:
6 (a) (i) Multi way decision making using _____
a) if
b) for
c) while
d) switch
1 M
6 (a) (ii) 5>3?printf(''hello''):printf(''C'');
a) hello
b) C
c) hello C
d) None
1 M
6 (a) (iii) The result of an expression 2>8 && 2<8 is
a) True
b) False
c) 10
d) 20
1 M
6 (a) (iv) Size of (float) is
a) 2
b) 4
c) 8
d) 1
1 M
6 (b) Explain switch structure with flowchart and write a program to display name a day in week for the given day number, assume day one is Monday.
6 M
6 (c) Write a program to find the given number is palidrome of not using while loop.
5 M
6 (d) Write a program to find square of a given number using loop.
(Note: Find square using successive addition method).
5 M

Choose the correct answer_id:
7 (a) (i) Array is an example of _____ data types
a) Derived
b) Basic
c) User defined
d) None
1 M
7 (a) (ii) An array a [5] consists of _____ number of elements.
a) 10
b) 5
c) 25
d) None
1 M
7 (a) (iii) An array a [5] [3] consists of _____ elements.
a) 5
b) 3
c) 15
d) None
1 M
7 (a) (iv) Which of the following is not a data structure
a) Linked list
b) Stack
c) Queue
d) Pointer
1 M
7 (b) Explain how a 1-dimensional array can be declared and initialized, write a program to add all the 'n' elements of an array.
6 M
7 (c) Explain the following string handling functions, with examples:
i) Streat
ii) Strepy
4 M
7 (d) Write a C program to multiply A[MXN] and B[PXQ] matrices and stores the result in C matrix.
6 M

Choose the correct answer_id:
8 (a) (i) Parallel computing is _____ execution of instructions.
a) Simultaneous
b) Serial
c) Accurate
d) Complete
1 M
8 (a) (ii) Which of the following is not a synchronization construct?
a) Single
b) Master
c) Section
d) Critical
1 M
8 (a) (iii) How many threads would be created for the parallel execution of for (x=0;x<10;x++){}?
a) 10
b) 9
c) 11
d) 0
1 M
8 (a) (iv) Which of the following does not signify the need of using threads?
a) Enhanced performance
b) Reduced processor idle time
c) Hidden memory latency time
d) Error-free computation
1 M
8 (b) Explain the data handling in open MP.
6 M
8 (c) What is thread? Explain the need for threads.
6 M
8 (d) Write a note on environment variables of open MP.
4 M



More question papers from Programming in C and Data Structures
SPONSORED ADVERTISEMENTS