27
AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015 © IETE 1 Q.2 a. Explain the structure of a computer system. (8) Answer:

AE102/AC102/AT102 COMPUTER CONCEPTS & C ...iete-elan.ac.in/SolnQPDec2015/Sol_D15_AE102_AC102_AT102.pdfQ.5 a. Write a program that calculates the sum of all perfect squares between

Embed Size (px)

Citation preview

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 1

Q.2 a. Explain the structure of a computer system. (8) Answer:

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 2

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 3

b. Write a brief note on information processing life cycle. (8) Answer:

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 4

Q.3 a. Define operating system, explain different functions of operating system.(6) Answer:

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 5

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 6

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 7

b. Explain the need for networks. (4) Answer:

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 8

c. Write a note on (i) LAN (ii) MAN (6) Answer:

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 9

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 10

Q.4 a. Draw a flow chart to find out whether a given number is prime or not. (4) Answer:

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 11

b.With a neat block diagram explain different steps of software development. (12) Answer:

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 12

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 13

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 14

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 15

Q.5 a. Write a program that calculates the sum of all perfect squares between 1 and

1000. (8) Answer: b. Write a program in C to determine the greatest common divisor (GCD) of

two numbers. (8) Answer:

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 16

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 17

Q.6 a. What are the different types of mathematical and logical operators available in C language? Explain precedence of arithmetic operators. (8)

b. Write a program to evaluate the roots of a quadratic equation. (8) Q.7 a. What are the different elements of a function definition? With a suitable

example explain: (10) (i) Functions with arguments but no return. (ii) Function with arguments and one return. Answer:

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 18

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 19

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 20

b. What are the three rules to pass an array to a function? Using functions write

a program to calculate the average of an array of values. The array elements are read from the terminal. (6)

Answer: Q.8 a. With a flow chart explain the syntax of else if ladder. (6) Answer:

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 21

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 22

b. Given are two one dimensional arrays A and B which are sorted in ascending

order. Write a program to merge them into a single sorted array C that contains every item from arrays A and B, in ascending order. (10)

Answer: Q.9 a. The names of employees of an organization are stored in three arrays,

namely First-name, Middle-name and Last-name. Write a program to concatenate the three parts into one string to be called name. (8)

Answer: b. Explain the following string handling functions with an example. (8) (i) Strcat() (ii) Strcmp() (iii) Strcpy() (iv) Strlen()

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 23

Answer:

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 24

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 25

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 26

9(b) Each Subdinision -3M 3x4=12M

AE102/AC102/AT102 COMPUTER CONCEPTS & C PROGRAMMING DEC 2015

© IETE 27

Text book

Computer Concepts and Programming in C,E. Balagurusamy, Tata McGraw –Hill,2010