AKTU 1st Year Sem 1 Solved Paper 2015-16 | COMP. SYSTEM & C PROGRAMMING | Sec A

Paper download link: Paper | Sem 1 | 2015-16

B.Tech.
(SEM-I) THEORY EXAMINATION 2015-16
COMPUTER SYSTEM & PROGRAMMING IN C

Time: 3hrs
Total Marks: 100

Note:-

  • There are three sections. Section A carries 20 marks, Section B carries 50 marks and Section C carries 30 marks.
  • Attempt all questions. Marks are indicated against each question.
  • Assume suitable data wherever necessary.

Section – A

1. Attempt all parts: (2*10 = 20)

  1. List five internal and external commands used in DOS operating system.
    Five internal and external commands used in DOS operating system are:



    • EDIT
    • CHKSDK
    • LABEL
    • DATE
    • TIME
  2. Explain the basic structure of C program.

    The structure of a C program is as follows:

    1. Header Files Inclusion
    2. Main Method Declaration
    3. Variable Declaration
    4. Body
    5. Return Statement
  3. How is binary file differ from text file?
    The binary file stores the data in the form of bits, i.e. 0 and 1. Whereas the text file stores the data in the form of characters, in its original format.
  4. Give difference between android and window OS.
    Android OS is developed by Google and is used to run mobile components like smartphones and TVs. It is an open source OS. Whereas the Window OS was developed by Microsoft and is used by their Franchise products only. It is not an Open Source OS.
  5. Differenctiate between structure and union.
  6. What is void pointer? How is it different from other pointers?
    A void pointer is a pointer that has no associated data type with it. A void pointer can hold the address of any type and can be typecasted to any type.

    filter_none

    edit
    close

    play_arrow

    link
    brightness_4
    code

    int a = 10;
    char b = 'x';
      
    void* p = &a; // void pointer holds address of int 'a'
    p = &b; // void pointer holds address of char 'b'

    chevron_right

    
    

    void pointers in C are used to implement generic functions, which can’t be implemented by other pointers.

  7. Justify that operating system is a resource manager.
    An Operating System performs all the basic tasks like managing file, process, and memory. Thus operating system acts as manager of all the resources, i.e. resource manager.
  8. Explain the dot (.) operator in C language with proper example.
    The dot (.) operator is used to access the child object.
    For example:

    filter_none

    edit
    close

    play_arrow

    link
    brightness_4
    code

    #include <stdio.h>
      
    struct Point {
        int x, y;
    };
      
    int main()
    {
        struct Point p1 = { 0, 1 };
      
        // Accesing members of point p1
        p1.x = 20;
        printf("x = %d, y = %d", p1.x, p1.y);
      
        return 0;
    }

    chevron_right

    
    

  9. What do you mean by operator precedence?
    Operator precedence determines which operator is performed first in an expression with more than one operators with different precedence. For example 10 + 20 * 30 is calculated as 10 + (20 * 30) and not as (10 + 20) * 30.

    Associativity is used when two operators of same precedence appear in an expression. Associativity can be either Left to Right or Right to Left. For example ‘*’ and ‘/’ have same precedence and their associativity is Left to Right, so the expression “100 / 10 * 10” is treated as “(100 / 10) * 10”.

  10. Write difference between implicit and explicit type casting.

    A type cast is basically a conversion from one type to another. There are two types of type conversion:

    1. Implicit Type Conversion Also known as ‘automatic type conversion’.
      • Done by the compiler on its own, without any external trigger from the user.
      • Generally takes place when in an expression more than one data type is present. In such condition type conversion (type promotion) takes place to avoid lose of data.
    2. Explicit Type Conversion This process is also called type casting and it is user defined. Here the user can type cast the result to make it of a particular data type.

      Syntax:

      (type) expression

      Type indicated the data type to which the final result is converted.



My Personal Notes arrow_drop_up

Technical Content Engineer at GeeksForGeeks

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

1


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.