VTU First Year Engineering (C Cycle) (Semester 1)
Programming in C and Data Structures
May 2016
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


Choose correct answers for the following;
1(a)(i) Who invented a machine known as difference engine?
A) Blaise Pascal
B) Charles Babbage
C) Peter Norton
D) Dennis Richie
1 M
1(a)(ii) which one of the following is optional components of a computer ?
A) Mouse
B) Hard Disk
C) RAM
D) Modem
1 M
1(a)(iii) Piezoelectric thechnology is used in______
A) Scanner
B) Mouse
C) Printer
D) Monitor
1 M
1(a)(iv) Who among the below not a microprocessor manufacture ?
A) Dual core
B) Advanced Micro Devices
1 M
1(b) With a neat diagram, explain the basic structure of computer.
6 M
1(c) Explain computers for individuals.
5 M
1(d) Explain four main characteristics of monitors.
5 M

Choose correct answers for the following;
2(a)(i) _______is an iterface for floppy drives
A) ISA
B) IDE
C) SATA
D) SCST
1 M
2(a)(ii) _______Kbps is data transfer rate of 16x CD - ROM derive
A) 150
B) 300
C) 1600
D) 2400
1 M
2(a)(iii) Which one of the following is not a process state?
A) Running
B) Ready
C) Blocked
D) Stop
1 M
2(a)(iv) ______is an type of network topology
A) Switch
B) Bus
C) Hub
D) Router
1 M
2(b) Explain different computer processing techniques.
6 M
2(c) What are the steps to create a custom - made software ? Explain
6 M
2(d) With a neat diagram explain tracks and sectors of a storage media. Calculate number of bytes in a magnetic media of 10 sectors and 4 disk
4 M

Choose correct answers for the following;
3(a)(i) The C programming language is not derived from ________ language
A) ALGOL
B) A
C) B
D) BCPL
1 M
3(a)(ii) Which among the following is compulsory in C programming ?
A) Local variables
B) Global variables
C) Function
D) Comment
1 M
3(a)(iii) What is the output of statement ;("%d * %f = %d",2,3.1, 2 * 3.1);
A) Error
B) Junk value
C) 2 * 3.1 =6.2 D) 2 *3.1 = 6.200000
1 M
3(a)(iv) Scanff("%8.4f",&a); During execution if we input 123.456 what is stored in variable a ?
A) 123.456
B) 123.4560
C) 123.456000
D) Error.
1 M
3(b) Explain different steps of creating and running a C program.
6 M
3(c) Write ans explain structure of a C program.
6 M
3(d) List all types of constants used in C programming
4 M

4((c) Write a C program to calculate compound interest using formula:\( CI=P\left ( 1+\dfrac{r}{n} \right )^{nt} \)
6 M
Choose correct answers for the following;
4(a)(i) Identify the invalid header file in C programming
A) ctype.h
B) complex.h
C) stdlib.h
D) iostream.h
1 M
4(a)(ii) Which of the following has an error?
A) #define PI 3.1415927
B) #define pi 3.1415927
C) # define PI = 3.1415927
D) # define pi 3.1415
1 M
4(a)(iii) Evaluate a=i * (j/=k/2); if i=4.0, j=2.0 and k=6.0
A) 2.6
B) 2.666667
C) 1
D) 0
1 M
4(a)(iv) Which is the computer expression for a = (xy)z?
A) a=pow(pow(x, y),z);
B) a=pow (x ,y ,z );
C) a = x**y**z;
D) a = pow(pow(z,x),y);
1 M
4(b) Explain different type conversion techniques with examples.
6 M
4(d) Evaluate following expression with values i = 3, j =4 , and k =2.
(i) i ++-j--
(ii) ++k% - -j
(iv) j++/i - -
4 M

Choose correct answers for the following;
5(a)(i) what is output for the following code segment ? fbr(i=5;1>=1;i - -)
if (i==3) continue; printf("%d" , i) ;
}
A) 54
B) 123
C) 1245
D) 5421
1 M
5(a)(ii) _________ is used to terminate a C program
A) Semicolon
B) exit
C) break
D) All of these
1 M
5(a)(iii) ________is widely used data type only in user defined functions.
A) void
B) int
C) float
D) double
1 M
5(a)(iv) Which one of the following is not a standard function?
A) return
B) abs
C) ceil
D) floor
1 M
5(b) What are advantages of user defined function? Explain.
6 M
5(c) Compare global variables with local variables.
5 M
5(d) Write a recursive C program to find factorial of a given number.
5 M

Choose correct answers for the following;
6(a)(i) The value of switch expression must of______type
A) int
B) float
C) double
D) All of these
1 M
6(a)(ii) Two way selection is implemented using_____statement
A) if
B) if---else
C) switch
D) None of these
1 M
6(a)(iii) Which one of the following is not an assignment operator?
A) =
B) !=
C) /=
D)+=
1 M
6(a)(iv) What is output for the following code segment?
while(-1)
}
printf("VTU");
}
printf("BELGAUM")
A) Infinite loop
B) Error
C) Infinite time prints VTU
D) infinite time prints VTUBELGAUM
1 M
6(b) Write a C program to find all roots of a quadratic equation.
8 M
6(c) Write a C program to find sum of series ; \( \text{sum}=x-\dfrac{x^3}{3!}+\dfrac{x^5}{5!}-\dfrac{x^7}{7!} \)
8 M

Choose correct answers for the following;
7(a)(i) Which one of the following is a valid array declaration?
A) int a [2][2] = {1,2};
B) int b [N] = {1, 2, 3,};
C) int c[5] = {1,2,3,a,b};
D) int d[2] = {1,2,3};
1 M
7(a)(ii) ________is a invalid function prototype
A) int avg (int x,int y, int z);
B) float power (float a, float b);
C) double min(float a; float b);
D) All of these
1 M
7(a)(iii) Identify the invalid string function :
A) strlen( )
B) strepy( )
C) streat( )
D) strin ( )
1 M
7(a)(iv) What is index of 6 in the array declaration given below.
int a [ ][4] = {1,2,3,4,5,6,7,8,9,10,11,12};
A) a[1][1]
B) a[2][2]
C) a[2][1]
D) a[1][2].
1 M
7(b) Write a C program to find row sum and column sum of a given matrix.
6 M
7(c) Define string. Explain different types of string with example.
5 M
7(d) Define array.Explain different types of arrays with example.
5 M

Choose correct answers for the following;
8(a)(i) In parallel programming which one of the header file is compulsory A) #pragma
B) omp.h /
C) stdio.h
D) conio.h
1 M
8(a)(ii) _______is an advantage of threads
A) Latency hiding
B) Seek time
C) Access speed
D) None of these
1 M
8(a)(iii) Identify the invalid construct of parallel programming
A) CRITICAL
B) SECTION
C) FOR
D) IF
1 M
8(a)(iv) Parallel computing is ______execution of instructions
A) Random
B) Sequential
Perfect
C) Perfect
D) Complete.
1 M
8(b) Write a parallel program in C to find product of two matrices.
10 M
8(c) Explain motivating factors for parallel programming.
6 M



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