Tuesday, November 16, 2010

Fundamentals of Programming FOP 1999 ATKT


Gujarat University

MCA Semester I
FOP
ATKT Exam

Date: 7h August,1999                              Marks: 50

Section I


Q-1      a. Describe the various data types available in C.                                                                               9

            b. What is a variable? Hoe does an array variable differ from an ordinary variable?
            c. Summarize the syntactic rules associated with for statement.
            d. What is the purpose of the break statement? Suppose a break statement is included within the
innermost of several nested control statements. What happens when the break statement is executed.
e. When passing an argument to a function, what is the difference between passing by value and
    passing by reference? To what types of arguments does each apply?
f. Distinguish between global and extern variables.

Q-2      a. Determine the value of each of the following logical expression  if a=5, b=10 , c=-6                   8
i.  a>b && a<c
ii. a==c || b>a
iii.b>15 && c<0 || a>0
iv. (a/2.0 == 0.0 && b/2.0 != 0.0) || c<0.0
b. Describe the output generated by the following program:
            main()
            {
                        int a, count;
                        int f1(int count);
                        for (count=1; count<=4; ++count)
                        {
                        a = f1(count);
                        printf(“%d”, a);
                        }
            }
            f1(int x)
            {
            static int y =0;
            y+=x;
            return (y);
            }

OR

Q-2      a. Write difference between while and do-while loops, with example.                                             8
            b. What will be the outcome of the following:
                        #include<stdio.h>
                        main()
                        {
                                    int I,j, x=0;
                                    for (I=0; I<5; ++I)
                                                for (j=0; j<I; ++j)
                                                {
                                                x += (I +j-1);
                                                printf(“%d”, x);
                                                }
                                    printf(“\nx = %d”, x);
                        }

Q-3      a. Explain static array with example.                                                                                                  8
b. Write a complete ‘C’ program to read marks of 5 subjects of 30 students for 10 classes. Display 
    maximum marks of every subject for each class.

OR

Q-3      a. Write a recursive C function to generate 15th terms of Fibonacci series.                                        8
b. Write a program which will read a string and rewrite it in sorted order. For example, the word
     STRING should be written as GINRST

Section II


Q-4      Answer the following:                                                                                                                                    10

a.What is the difference between formal arguments and actual arguments?
b.How can an entire structure be passes to a function? Describe.
c.What is a union? How does a union differ from a structure?
d.What is the principal difference between the function malloc and calloc?
e.Why a linked list is called a dynamic data structure? What are advantages of using linked lists over arrays?

Q-5      Write a program to accept 10 integers. Define a function, which is receiving 10 integers from the main program as an array. Function should sort the numbers using any convenient method and return the sorted array back to main program.                                                                                       7

OR

Q-5      Define a structure that can describe a hotel. It should have members that include the name, address, grade, average, average from charge, and number of rooms.                                                                        7
            Write functions to perform the following operations:
a.                               to print out hotels of a given grade in order of charges
b.                              to print out hotels with room charges less than a given value

Q-6      a. A C program contains the following statements                                                                             8
                        char u, v= ‘A’;
                        char *pu, *pv = &v;
                        ……………
                        *pv = v+ 1;
                        u = *pv + 1;
                        pu = &u;
Suppose each character occupies 1 byte of memory. If any value assigned to u is stored in (hexadecimal) address FBC and the value assigned to v is stored in address F8D, then
1. what value is represented by &v?
2. what value is assigned to pv?
3. what value is represented by *pv?
4. what value is assigned to u?
5. what value is represented by &u?
6. what value is assigned to pu?
b. Write a ‘C’ program to search an element in a given linked list.

OR

Q-6      a. Explain the use of pointers in variable parameter passing with example.                                       8
b. Two files DATA1 and DATA2 contain sorted lists of integers. Write a program to produce a third file DATA which holds a single sorted, merged list of these two lists. Use command line arguments to specify the file names.

Fundamentals of Programming FOP


Gujarat University

MCA Semester I
FOP

Date: 18-1-2001                                                                                                                                 Marks:50


Instructions:
1.      Answer both the sections in separate answer books.
2.      Make necessary assumptions wherever necessary.

Section I


Q-1 a) What do you understand by Operator precedence and associatively? Explain giving suitable examples.
                                                                                                                                                                        (4+5)
       b) A ‘C’ program contains the following statements:
            #include <stdio.h>
            int I;
            long ix;
            unsigned u;
            float x;
            double dx;
Write an appropriate printf function to write out the values of I, ix, u, x and dx, assuming that each integer quantity will have a minimum filed width of five characters, the long integer will have a minimum filed width of 12 characters, and the floating point quantity will be atleast 10 characters with a maximum of five decimal places.

Q-2      Answer any two:                                                                                                                                 (8)
a)      Given a list of marks ranging from 0 to 100, write a C program to compute and print the number of
Students.
i)                    Who have obtained more than 80 marks.
ii)                  Who have obtained more than 60 marks.
iii)                Who have obtained more than 40 marks.
iv)                Who have obtained 40 or less marks
v)                  Who have obtained marks in the range 81 to 100
vi)                Who have obtained marks in the range 61 to 80
vii)              Who have obtained marks in the range 0 to 40.
The program should use minimum number of If statements.
b)      Write a ’C’ program to generate first N prime numbers.
c)      Write a ‘C’ program to sort a list of characters.

Q-3 a) State several advantages to use of functions.                                                                          (3+2+3)
       b) Each of the following is the first line of the function definition. Explain the meaning of each.
            i) float f(float a, float b)          ii) void f(int a)
            iii) long f (long a)                    iv) char f(void)
       c) What do you understand by scope and lifetime of a variable? Describe giving suitable examples.

OR

Q-3 a) What is pointer? How pointers can be used to achieve the effect of call by reference parameter passing
mechanism.                                                                                                                             (3 + 4+1)
       b) A ‘C’ program contains the following declaration:
            Static int x[8] = {10, 20, 30, 40, 50, 60, 70, 80};
i)                    what is the meaning of x?
ii)                  what is the meaning of (x+2)?
iii)                What is the value of (*x+2)?
iv)                What is the value of *(x+2)?
      c) Distinguish between (*m) [5] and *m[5].


Section II


Q-4      Define the following giving suitable examples:                                                                                  (9)
1.      Union
2.      Bitwise operators
3.      Macro

Q-5      Answer any two:                                                                                                                                 (8)
a.       Write a recursive function to calculate x to the poser y, where x and y are two integer numbers.
b.      Explain the general format and use of fseek function.
c.       What do you understand by bit fields? Explain the advantages of using bit fields giving suitable example.

Q-6      Write menu driven program to create a linked list of a class of students (containing the name, age and
weight of each student) and perform the following operations:
i.                    write out contents of the list.
ii.                  Display the information of a specific student.
iii.                Count the number of students above a specific age and weight.

OR

Q-6      Write an interactive menu driven program that will access the data file containing list of students and

their corresponding telephone numbers, and do one of the following tasks:                                     (8)
i)                    Determine the telephone number of a specific student.
ii)                  Determine the student whose telephone number is specified.


Fundamentals of Computer Organization FCO 2001 ATKT


Gujarat University
MCA Semester I
FCO  (ATKT)

Date: 20th August, 2001                                                                                                                    Marks:50

Instructions:
1.      Attempt all questions.
2.      Answer to two sections should be written in separate answer-books.
3.      Figures to the right indicate full marks.
4.      Make suitable assumptions wherever necessary and clearly indicate it.
5.      Draw diagrams wherever necessary.

Section I


Q-1      Answer the following:                                                                                                                                    (9)
a.       Convert the following decimal numbers to equivalent binary numbers:
43, 0.375, 27/32, 64
b.      State and prove De Morgan’s theorems.
c.       Which gates are called Universal gates and why?
d.      Simplify the following expressions:
i) ABC ( ABÇ + ABC + ÅBC)    ii) AB + AB + ÅC + ÅÇ
e.       Explain full-adder with necessary diagrams.

Q-2 a) Explain Master-Slave flip-flop with block diagram and logic design.                                                (8)                 
       b) Explain JK Flip-Flop giving its logic diagram. What is the disadvantage of using JK flip-flop.

OR

Q-2 a) Explain clocked RS flip-flop giving its logic diagram?                                                                       (8)
        b) Explain binary counter with timing diagram.                                                            

Q-3 a) Convert the following expressions to sum of product forms:                                                             (8)
i)                    (A+B) (B+C) (Å+C)

ii)                  (Å+C) (Å+B+Ç) (A+B)
iii)                (A+C) (AB+AC) (ÅÇ+B)
iv)                (Å+B) (Ç+B)
        b) Explain binary coded decimal adder with necessary diagram.

OR

Q-3 a) Perform the following operations using 9’s complement and 10’s complement method.                   (8)

i)                    14-9
ii)                  198-124
iii)                8-4
iv)                15-9
        b) Explain Decoders.
           

Section II


Q-4      Answer the following:                                                                                   
            a) State the segment registers of 8086 microprocessor.                                                                      (9)
            b) State the differences between static RAM and dynamic RAM.                                                   (1)
a)      Explain logic circuit tristate driver.
b)      Explain DMA.
c)      Write note on: CRT output devices.

Q-5 a) Write short note on: Key boards                                                                                                         (8)
        b) Explain 4 x 1 Multiplexer.

OR

Q-5 a) Explain the following Harris 6100 microprocessor instruction words:                                               (8)            TAD, DCA, JMB
       b) Write short note on : Printers and its types

Q-6 a) What is addressing mode. Explain direct, indirect and immediate addressing modes with example.(8)
        b) Explain the difference between pulse duration and pulse transition Flip-Flop with timing diagram.

OR

Q-6 a) Write short note on: Magnetic Disk Memories
       b) State and explain different categories of IC memories . What are the advantages of using IC memories.


 

Fundamentals of Computer Organization FCO 1999


Gujarat University

MCA Semester I
FCO

Date: 8/1/1999                                                                                                                                    Marks:50


Section I


Q-1 a) Answer the following questions:                                                                                                         [4]

i)                    Convert the following decimal number 250.3 to binary, octal and hexadecimal numbers.
ii)                  Perform the following operation using 2’s complement and 1’s complement
(11.11)2 – (10.111) 2
iii)                Perform the following operation using 10’s complement and 9’s complement
(20)10 – (1000)10
iv)                Multiply and divide the following binary numbers in binary system
(11) 2 – (0.101) 2
        b) Find the minimal sum of product and product of sum expression for the following function using
Karnaugh maps and realize the expression using appropriate gates. Also realize sum of product form using NAND-to-NAND gate network and convert this gate network to AND-to-OR gate network. Use as few gates as possible.                                                                                                                                 [5]
F(W,X,Y,Z) = åm(0,13,4,6,12,13,14,15) + åd(2,5,7)
Here, m represents minterms and d represents Don’t care conditions.

Q-2 a) Explain the working of a modulo-8 Binary counter using suitable flip-flop.                                      [4]

OR

       a) Explain the working of Binary Half-Adder. Construct a Full-adder from half-Adders.                   
       b) Answer the following questions:                                                                                                         [4]
i)                    Prove De Morgan’s theorems for three variables
ii)                  Explain the floating point number representation in the computer system
iii)                Explain the different types of character recognition techniques.

Q-3 a) Explain with diagram a 3-to-8 DECODER.                                                                                       [3]

OR

a)      Explain with diagram an 8-input MULTIPLEXER.
b)      Explain the two-dimensional selection system in memory organization.                                          [5]
OR
b)      Design a 3-bit counter with the following binary sequence using RS flip-flops.                             
000, 001, 011, 010, 100, 101, 111 and repeat

Section II


Q-4 a) Explain the instruction and execution cycle organization of the control registers.                             [3]

        b) Answer the following questions:                                                                                                          [6]
i)                    Explain the different addressing techniques using suitable examples.
ii)                  Explain the logical operations performed by the ALU.
iii)                Write a note on Mouse.

Q-5 a) Explain the architecture or features of any 16-bit microprocessor.                                                     [4]

OR

       a) Answer the following questions:        
i)                    Explain the use of the flag register and the different addressing modes used in 8080 microprocessor.
ii)                  Explain the use of tri-state drivers in BUS system of the computer.
       b) Write short notes on the following: (any two)                                                                                                [4]
i)                    Error Detection and Error correction
ii)                  Register Transfer Language
iii)                Floppy disk controller

Q-6 a) Distinguish between the following (any four)                                                                                     [8]
i)                    Impact and non-Impact printers
ii)                  Combinational circuits and Sequential circuits
iii)                Floppy Disk Drive and Hard Disk Drive
iv)                Static RAM and Dynamic RAM
v)                  RS flip-flops and JK flip-flops