DipIETE – ET/CS (NEW SCHEME) - Code: DE53 / DC53

 

Subject: COMPUTER FUNDAMENTALS & C PROGRAMMING

Flowchart: Alternate Process: DECEMBER 2009Time: 3 Hours                                                                                                     Max. Marks: 100

 

 

NOTE: There are 9 Questions in all.

·      Question 1 is compulsory and carries 20 marks. Answer to Q. 1 must be written in the space provided for it in the answer book supplied and nowhere else.

·      Out of the remaining EIGHT Questions answer any FIVE Questions. Each question carries 16 marks.

·      Any required data not explicitly given, may be suitably assumed and stated.

 

 

Q.1       Choose the correct or the best alternative in the following:                                  (210)

       

             a.  Which statement is valid?

 

                  (A) 1 KB = 1024 bytes                        (B) 1 MB = 2048 bytes

                  (C) 1 MB = 1000 kilobytes                  (D) 1 KB = 1000 bytes

 

             b. Which statement is valid about computer program?

 

                  (A) It is understood by a computer       

                  (B) It is understood by programmer

                  (C) It is understood by user                 

                  (D) Both (B) & (C)

 

             c.  Software in computer _____________

 

                  (A) enhances the capabilities of the hardware machine                                                       

                  (B) increase the speed of central processing unit

                  (C) Both of above                               

                  (D) None of above

 

             d.  Identify the invalid pointer arithmetic

 

                  (A) Addition of float value to a pointer 

                                                                              (B) Comparison of pointers that do not point to the element of the same array

                  (C) Subtracting an integer from a pointer                                                                           

                  (D) Assigning the value 0 to a pointer variable

 

             e.  A Compiler is _____________

 

                  (A) a combination of computer hardware                                                                          

                  (B) a program which translates from one high-level language to another

                  (C) a program which translates from one high-level to a machine level                                

                  (D) None of these

 

 

            

 

            

             f.   When a key is pressed on the keyboard, which standard is used for converting the keystroke into the corresponding bits?

                 

                  (A) ANSI                                             (B) EBCDIC

                  (C) ASCII                                            (D) ISO

 

             g. C language is available for which of the following Operating Systems?

 

                  (A) DOS                                              (B) UNIX

                  (C) Windows                                       (D) All of these

 

             h.  Which of the following are tokens in C?

                                                                                                                                                                       

(A)  Keywords                                      (B) Variables

                  (C) Constants                                       (D) All of the above

 

             i.   An expression contains relational, assignment and arithmetic operators. If Parenthesis is not present, the order will be

 

                  (A) Assignment, arithmetic, relational    

                  (B) Relational, arithmetic, assignment

                  (C) Assignment, relational, arithmetic    

                                                                              (D) Arithmetic, relational, assignment

 

             j.   If the size of the array is less than the number of initializers then,

 

                  (A) Extra values are being ignored        

                  (B) Generates an error message

                  (C) Size of Array is increased              

                  (D) Size is neglected when values are given                                                                       

            

 

Answer any FIVE Questions out of EIGHT Questions.

Each question carries 16 marks.

 

 

  Q.2     a.   Differentiate between a program and programming. Develop an algorithm to find the greatest of three numbers.                                                                                                           (6)

                  

             b.   Give the representation of characters and fractions in a computer with an example.             (6)

 

             c.   Find the binary equivalent of 23 and 0.8125.                                                      (4)

 

  Q.3     a.   Write a brief note on the following input and output devices:-

 

                   (i)   Keyboard                                     (ii)  Scanners

                   (iii) CRT displays                                                                                               (6)

            

             b.   Mention the advantages and disadvantages of Machine and Assembly level language.                      (4)

            

                                                                             

             c.   What is a multi-user operating system? Mention the advantages and disadvantages of multi-user operating systems.                                              (6)

 

  Q.4     a.   What is the need for having computer networks? Differentiate between

                   LAN and WAN.                                                                                               (8)

       

             b.   What is an interrupt? Explain various types of interrupts.                                     (8)

       

  Q.5     a.   Describe salient features of C and write a C Program to display logic

                   0 if one reads a character through a keyboard otherwise 1 (ASCII values

                   for 0 to 9 are 48 to 57 respectively).                                                                  (8)

 

             b.   What are the basic data types and size supported in C?                                      (4)

 

             c.   Write a C program to divide a sum of two numbers by their difference.               (4)

 

  Q.6     a.   Write a C program to calculate an Air ticket fare after discount using if-then-else construct, given the following conditions:

 

                   (i)    If passenger is below 14 years then there is 50% discount on fare

                   (ii)   If passenger is above 50 years then there is 20% discount on fare

                   (iii) If passenger is above 14 and below 50 then there is 10% discount on fare                                (10)

             b.   Write a program to generate the following pattern given below using for loop

                        1

1 2

1 2 3

                        1 2 3 4                                                                                                         (6)

 

  Q.7     a.   Write a program to print multiplication table using two-dimensional array.            (6)

 

             b.   Explain with an example how character array initialization is done.                       (4)

 

             c.   Write a program to illustrate how the marks of 10 students are read in an array and then used to find the maximum marks obtained by a student in the class.                                                                         (6)

  Q.8     a.   What is need for user-defined functions?  Write a function using recursion to find factorial of a number n and show dry run by using n = 3.                (6)

 

             b.   Write a C program to calculate the square of a given integer using a user-defined function.              (6)

 

             c.   What are the advantages and disadvantages of Call by value?                             (4)

 

  Q.9     a.   What are various arithmetic operations that can be performed on pointers? What do you mean by NULL Pointer assignment?                             (8)

 

             b.   Write a C Program that accesses array elements of a one-dimensional array using pointers.             (8)