foc-model-i

Upload: rithika-mohan

Post on 04-Apr-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/30/2019 foc-model-I

    1/2

    MUTHAYAMMAL TECHNICAL CAMPUS, RASIPURAM637408

    MODEL - 1

    Date: 10.12.12 Marks: 100

    Subject Name: Fundamentals computing and programming Duration: 3 Hrs

    Dept: CSE, MECH

    PartA (10 x 2 = 20)

    1) What is meant by keyword? List out the keywords in C.2) Difference between constant and variable.3) Distinguish between (*m)(5) and *m(5).4) Differentiate between getchar() and scanf() functions for reading strings.5) Write the output for the following C program.

    main(){

    char s[10];

    strcpy(s,abc);

    printf( %d %d, strlen(s), sizeof(s));}

    6) What is symbolic constant?7) Write the output for the following C program.

    main()

    {

    int i=5,j;j =++i +++i+++i;

    printf(%d %d,i,j);

    }

    8) Give the advantages of pointer.9) List the similarities and difference between structure and union.10)Write an appropriate function call (function access) for the following function.

    void display(int a, int b){

    c=sqrt(a*a + b*b);

    printf(c = %i\n, c);

    }

    Part-B (5 x 16 = 80)

    Answer any FIVE for the following questions.

    11) a) Differentiate between operator and operand. Describe the various types of operators

    supported by C. (12)

    b) Give the output for the program (4)

    main()

    {

    int i=0,x=0;

  • 7/30/2019 foc-model-I

    2/2

    while(i