acc ut-i

Upload: abhiraj1234

Post on 02-Jun-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 ACC UT-I

    1/4

    Savitribai Phule Shikshan Prasarak Mandals

    SKN SINHGAD COLLEGE OF ENGINEERINGA/P: Korti Tal: Pandharpur Dist: Solapur

    UUUDay and Date: / /2014 Max. Marks: 50Time: am to am Branch: S.E (CSE)

    Subject: Advanced C Concept

    Q.1. Multiple Choice Questions (1 Mark Each)

    1) Which of the following statement terminate the execution of a loop.

    a) Else b) Break c) Return d) Goto

    2) Variables which can be accessed by all modules in a program are known as

    a) Local variable b) Internal variable c) External variable d) Global variable

    3) If fopen( ) fails it return

    a) -1 b) NULL c) 1 d) File pointer

    4) The function used for reading formatted input data from a file is

    a) getchar( ) b) fscanf( ) c) scanf( ) d) gets( )

    5) The integer variable declared as static are initialized to

    a) -1 b) 0 c) Garbage d) None

    6) The function used for memory allocation is

    a) Malloc( ) b) Calloc( ) c) Realloc( ) d) None

    7) What will be the output of following statement?

    Printf(%d)strcmp(push.pull));

    a)8 b) -8 c) 0 d) 7

    8) If a file is opened in rt mode using fopen( ), the operation possible on this file are

    a) Reading existing content b) Writing new contents

    c) Modifying existing contents d) All the above

    Roll No:

    Unit Test I DSE)

  • 8/10/2019 ACC UT-I

    2/4

    9) The fseek( ) function is used for

    a) Setting the position to the beginning of file b) Give the current position in the file

    c) Set position to a desired point in the file. d) None

    10) The statement a=-5 means

    a) a = 5-5 b) a = a-5 c) a = 5 d) a = 5 - a

    Q.2. Attempt any four questions (4*5 = 20 Marks)

    1) Explain string with its initialization.

    2) Explain array of string with example.

    3) Explain pointer to pointer.

    4) Explain pointer to array and array of pointer.

    5) Explain file handling functions.

    Q.3. Attempt any one question. (10 Marks)

    1) Explain different string handling function in detail.

    2) Write a note on pointer and dynamic memory allocation.

    Q.4. Attempt the following question. (10 Marks)

    1) What is algorithm? How algorithms is analyzed and explain time and space complexity.

  • 8/10/2019 ACC UT-I

    3/4

    Savitribai Phule Shikshan Prasarak Mandals

    SKN SINHGAD COLLEGE OF ENGINEERINGA/P: Korti Tal: Pandharpur Dist: Solapur

    UNIT TEST - IIDay and Date: / /2014 Max. Marks: 50Time: am to am Branch: S.E (CSE)

    Subject: Advanced C Concept

    Q.1. Multiple Choice Questions (1 Mark Each)

    1) The worst case analysis of quick sort is

    a) O(n) b) O(n log n) c) O (n2) d) O (1ogn)

    2) The fseek( ) function is used for

    a) Setting the position to the beginning of file b) Give the current position in the filec) Set position to a desired point in the file. d) None

    3) The function used for reading formatted input data from a file is

    a) getchar( ) b) fscanf( ) c) scanf( ) d) gets( )

    4) Which of following sort is also called diminishing increment sort ?a) bubble sort b) selection sort c) shell sort d) insertion sort

    5) In ------------------- searching the records must be sorted.a) Linear search b)Hashing c) Binary search

    6) The is the fastest searching technique.a)Linear search b)Binary search

    7)The worst case analysis of bubble sort isa)O(n) b)O(n log n) c)O(n2) d)O(log n)

    8) Divide and conquer is used ina)Merge sort b)Quick sort c)Both a and b d) Neither a nor b

    9) The worst case analysis of heap sort isa)O(n2) b)O(log n) c) O(n log n) d) O(n)

    10) The function used for memory allocation isa) Malloc( ) b) Calloc( ) c) Realloc( ) d) None

    Roll No:

  • 8/10/2019 ACC UT-I

    4/4

    Q.2. Attempt any four questions (4*5 = 20 Marks)

    1) Write a note on Merge short

    2) Compare sequential search with binary search

    3) Write a short note on : Complexity of algorithms.

    4) How algorithms are analysed? Explain Big O, Omega, Theta notation.

    5) Write a note on insertion sort.

    Q.3. Attempt any one question. (10 Marks)

    1) Explain bubble sort. Sort the following using bubble sort

    10 5 25 15 30 45 60 55 40.

    2) Write a note on heap sort.

    Q.4. Attempt the following question. (10 Marks)

    1) Sort the following list of element in ascending order using quick sort.

    50,22,11,78,16,95,7,75,51,41

    .