PC TRAINING INSTITUTE LIMITED

                                BT0065
                    C PROGRAMMING & DATA STRUCTURE
                             [1 mark each]

1) The digital implies that the information in t
      a) variables
      b) constants
      c) data types
      d) none of the above
2) There are_____ numbers of characters in C language.
      a) 32
      b) 98
      c) 32
      d) 19

3) Flow chart has no startorno end symbols
      a) True
      b) False

4) In c language there are ____ basic data types.
       a) 3
       b) 4
       c) 2
       d) 5
5) Decision making is done by if statement.
       a) True
       b) False

6) C language is
       a) General-purpose programming language.
       b) Block structured programming language
       c) Imperative computer programming language
       d) All of the above.

7) Using array one can declare and define multiple variables of
      a) The same type with one identifier.
      b) The different type with one identifier.
      c) The same type with different identifier.
      d) The different type with different identifier.

8) At the time of initialization of array, dimension is optional.
       a) False
       b) True

9) There are____ storage class in ‘C’
      a) Three



                                                                    1
PC TRAINING INSTITUTE LIMITED

       b) Four
       c) Two
       d) Five

10) _____ is a self-contained block of statements that are perform a coherent
   task of some kind
      a) Function
      b) Array
      c) Structure
      d) None of the above.

11) Methods of calling a function are:
      a) No argument No return value.
      b) No argument with Return value.
      c) Argument no return value.
      d) Argument with return value.
      e) All of the above

12) A structure is a method of packing data of --
       a) same type
       b) different type
       c) both a and b
       d) None of the above.

13) C programming language was developed by
      a) Dennis Ritchie
      b) Ken Thompson
      c) Bill Gates
      d) Peter Norton

14)C is a_________ language
       a) High level
       b) low level
       c) Middle level
       d) Machine language


15) Pointers is a special type of variable which is used to hold the ____ of
   variable
       a) Pointer
       b) Address
       c) File
       d) None of the above


16) While using pointers



                                                                                2
PC TRAINING INSTITUTE LIMITED

       a)   One pointer can hold only one address at a time.
       b)   Before use, pointer must be defined.
       c)   Pointer hold only address, not the value.
       d)   All of the above.

17)Memory allocation at the runtime is known as
     a) Static memory allocation
     b) Dynamic memory allocation
     c) Paging
     d) None of the above

18)Memory allocation at the compile time is known as
     a) Static memory allocation
     b) Dynamic memory allocation
     c) Paging
     d) None of the above

19)To deallocate the memory space the function ___ is used
      a) Calloc()
      b) Free()
      c) Malloc()
      d) None of the above.

20) Structure initialization is not possible. (True/False)

21)Union and structure are same except storage allocation. (True/False)

22)To write to a new file or modify the contents of an existing file, you must first
      a) Open a file
      b) Close a file
      c) Read a file
      d) Write a file

23)____ mode to truncate to 0 length, if existent, r create text file for update over
   bibary file.
      a) “w”
      b) “rb+”
      c) “wb+”
      d) “w+”

24)“w+” and “wb+” are same about it operation. (True/False)

25) putc() and puts() are the same in nature. (True/False)


26)Which escape character can be used o beep from speaker in C?



                                                                                       3
PC TRAINING INSTITUTE LIMITED

      a)   a
      b)   b
      c)   m
      d)   c

27)Maximum size of the double variable is:
     a) 1 byte
     b) 4 byte
     c) 8 byte
     d) 16 byte

The operator & is used for
      a) Bitwise AND
      b) Bitwise OR
      c) Logical AND
      d) Logical OR


28)The operator | is used for
      a) Bitwise AND
      b) Bitwise OR
      c) Logical AND
      d) Logical OR


29)Which operator is used for increasing the value of the variable by one only
     a) a=a+1
     b) a++
     c) Both a & b
     d) None of the above

30)The operator + in b+=7 means
      a) b=7+7
      b) b+7=b
      c) b=b+7
      d) b=7
      e) None of these



31)Which is a specification of a set of data and the set of operations that can be
   performed on the data?
      a) Linear data structure
      b) Homogenous data structure
      c) Abstract data structure
      d) None of the above.



                                                                                     4
PC TRAINING INSTITUTE LIMITED


32)A data structure is said to be linear if its element forms a
      a) Sequence
      b) Linear list
      c) Both a & b
      d) None of these

33)Array is
      a) linear data structure
      b) non-linear data structure
      c) complex data structure
      d) none of these

34)Push operation is used to
      a) insert item into stack
      b) delete item from stack
      c) display item from stack
      d) None of the above.

35)A data structure , in which a element is added and removed only from one
   end is, is known as-
      a) queue
      b) stack
      c) array
      d) none of these

36)LIFO means :
      a) Least in Fast out
      b) Last in first order
      c) Last in first out
      d) none of these

37)FIFO means :
      a) Fast in Fast out
      b) First in first out
      c) First in first order
      d) none of these

38)If the stack is full, called:
        a) Stack Underflow
        b) Stack Overflow
        c) Outflow
        d) none of the above




                                                                              5
PC TRAINING INSTITUTE LIMITED

39)Array is a collection of
      a) identical data objects
      b) different data objects
      c) Both a and b
      d) None of these

40)Deque is a special type of data structure in which insertion and deletion will
   be done..
      a) Either at rear end or at the front end of the queue.
      b) Neither at front end nor at the rear end of the queue.
      c) Either at front end or at the rear end of the queue.
      d) None of the above



                                   [2 marks each]

41)___ queue is a collection of elements such that each element has been
   assigned a priority
      a) priority queue
      b) Circular queue
      c) Deque
      d) none of these

42)Operation performed on linear lists:
     a) Insertion of nodes
     b) Deletion of nodes
     c) Retrieval of values
     d) Traversal in the list
     e) None of the above.

43)By Doubly Linked List, we can move in both the direction: (True/False)



                                                         1
                                                         4
44)Traverse the given tree using Pre-order.              4

          Given tree:                     8                              4
                                          4                              3



                               1                  1           3                         9
                               3                  6           3                         7



                                                                     6              6
                                     5        9           7
                                     3                               4
                                              9           2
PC TRAINING INSTITUTE LIMITED

      a)   16 84 13 14 99 72 53 33 64 43 97
      b)   14 13 84 16 53 72 99 64 33 43 97
      c)   14 84 13 53 16 99 72 43 33 64 97
      d)   None of the above.

45)Convert the expression A+ (B*C-(D/E^F)*G*H to equivalent Postfix notation.
     a) ABC*DEF^/G*-H*+
     b) ABC*DEF^+/GH*+
     c) A- * BC^ + DE -+ FG
     d) AB+C - DE ^ - *+ FG

46)Perform Inorder traversal of following tree:



                                     A


                                B            C


                        D                E        F


                 G          H                I


      a)   ABDGHCEIF
      b)   GHDBIEFCA
      c)   GDHBAEICF
      d)   GHDBACIEF

47)In an AVL tree, the height of two child subtrees of any node differ by
   a) At most one
   b) At most two
   c) At least one
   d) At least two

48)True/false
   a) BST and AVL Tree are same.(True/False)
   b) Nodes that are not root and not leaf are called internal node. (True/False)




                                                                                7
PC TRAINING INSTITUTE LIMITED

49)BFT stands for
   a) Breadth-First Traversal
   b) Best-First Traversal
   c) Best-Fit Traversal
   d) None of the above.

50)The most efficient method of searching a sequential table without the use of
   auxiliary indices or tables is
   a) The Binay Search
   b) The Sequential Search
   c) Both a and b
   d) None of the above

51) Bubble sort has _______
   a) Worst-case complexity O(n2)
   b) Best-case complexity O(n2)
   c) Average-case complexity O(n2)
   d) None of the above

52)True/False
   a) In quick sort, any element can be considered as pivot.(True/False)
   b) Selection sort and bubble sort having same time complexity(True/False)

53)The preorder traversal of a binary tree begin with-
   a) Traversal of the left sub tree in preorder
   b) Traversal of the right sub tree in preorder
   c) Processing of the root node
   d) None of the above

54)The stack can be implemented by using
   a) Arrays
   b) structures
   c) Union
   d) None of the above.

55)Link of linked list in C is of type
      a) unsigned integer
      b) Pointer to integer
      c) Pointer to struct
      d) None of the above

56)A technique, which collects all deleted space onto free storage list, is called-
      a) Static memory
      b) Garbage collection allocation
      c) Dynamic allocation
      d) None of the above



                                                                                      8
PC TRAINING INSTITUTE LIMITED


57)Worst case efficiency of this search is n.
     a) Sequential search
     b) Binary search
     c) Indexed search
     d) None of these

58)Pointer when used in program after definition, then “*” means ___ and “&”
   means
   a) “value of” , “address of”
   b) “address of” , “value of”
   c) Both a & b
   d) None of the above.

59)Recursion is a tool to allow the programmer to reach a particular point called
   recursion point. It execute from
   a) Button to Top
   b) Top to Button
   c) Left to Right
   d) Right to Left

60)Disk operating system functions are:
   a) getdata()
   b) gettime()
   c) setdate()
   d) all of the above.

                                         (4 marks each)

61.    Match making
       a) Macro                                 i) unsigned long int
       b) Data type                             ii) 0
       c) Single quotes                         iii) #
       d) Null                                  iv) ‘’

       a)     a iii, b i, c iv, d ii
       b)     a i, b ii, c i, d i
       c)     a ii, b iii, c ii, d iii
       d)     a iv, b iv, c iii, d iv

62     find indegree or outdegree of vertex 4

                                     1            2


                          6                            3



                                                                               9
PC TRAINING INSTITUTE LIMITED


                                5         4

      a)     1, 1
      b)     2, 1
      c)     1, 2
      d)     2, 2
63    Find the output of following:

      void main()
      {
      int age=18;
      if(age>=13 && age<=19)
      {
      printf(“Teen Ager”);
      }
      printf(“n Bye Bye”);
      }
      a) Teen ager
      b) Bye Bye
      c) Both a & b
      d) No output.

64    Find the output of following:

      void main()
      {
      int i;
      for(i=1;i=10;i++)
      {
      printf(“%d”,i);
      }
      }
      a) 1 2 3 4 5 6 7 8 9 10
      b) 10
      c) 1
      d) no output

65     A…………….variable declaration looks normal, but is located outside any
of the programs function. This is usually done at the beginning of the program file
before the ………..but after…………….directives.

      a)   Global, main (), preprocessor
      b)   General, main (), Preprocessor
      c)   General, main (), headerfile
      d)   None of the above



                                                                                 10
PC TRAINING INSTITUTE LIMITED



66.    What will be the output of the following?
       #include<stdio.h>
       main()
       {
       int *i, *j, a=12, b=2,c;
       c=(a=a+b, b=a/b, a=a*b, b=a-b);
       i=&c;
       printf(“%d”,--(*i));
       a)        93
       b)        92
       c)        91
       d)        90.


67.    The output of the following program:
       #include<stdio.h>
       main()
       {
       int a[3][3]=(3,7,8,6,5,4,3,5);
       printf (“%d”, (a[2][0]>a[0][0])? a[0][2]: a[2][2]);
       }
       a)       8
       b)       7
       c)       6
       d)       None of the above.


68. Find out put of the following:
      void main()
      {
      char str[]=”computer”;
      strupr(str);
      printf(“%c”,str);
      }

       a)     COMPUTER
       b)     computer
       c)     Both a & b
       d)     None of these.

69.    Study the foll c program:
       #include<stdio.h>
       void main()
       {



                                                             11
PC TRAINING INSTITUTE LIMITED

       int a=7,b=5;
       int x=3;
       switch(x)
                     PC Training Institute Ltd., An ISO-9001 Certified Organisation
       {
       case 1:        a=a-b;break;
       case 2:        a=a+b;break;
       case 3:        a=a*b;break;
       case 4:        a=a/b;break;
       default :a=a;
       }
       printf(“%d”,a);
       }
       What will be the output:
       a)      37
       b)      35
       c)      11
       d)      None of these.

70.      Study the following C program:
#include<stdio.h>
void main()
{
int I;
clrscr();
printf(“list of even numbers b/w 1 to 100n”);
for(i=5;i<=0;i--)
{
printf(“%d”,i)
}
}
         a)      54321
         b)      12345
         c)      12543
         d)      None of these.


71.     What is the output of:
#include<stdio.h>
void main()
{
int a=7;
for (;a>=1;)
a--;
}
        a)    1234567
        b)    1234578



                                                                                      12
PC TRAINING INSTITUTE LIMITED

       c)     7654321
       d)     no out put

72.      Find output of following
 #include<stdio.h>
void main()
{
auto int i=1;
{
auto int i=2;
{
auto int i=3;
printf(“%d”,i);
}
printf(“%d”,i);
}
 printf(“%d”,i);
}
         a)     123
         b)     3 21
         c)     111
         d)     333

73.    C is ……………language, i.e. it recognizes a …………..case letter and it’s
       ……….case equivalent as being different.

       a)     Case sensitive, upper, lower
       b)     Not a case sensitive, upper, lower
       c)     Not a case sensitive, predefined, user defined
       d)     None of the above

74.      Find output of following
# include<stdio.h>
external int x=10
void main()
{
int x=20;
printf(“%d”,n);
display();
}
display()
{
printf(“%d”,x);
}
        a) 10 10
        b) 20 20



                                                                        13
PC TRAINING INSTITUTE LIMITED

   c) 10 20
   d) 20 10

75. Match the followings:

A. strrev()                               (i)                   Stack
B. Queue                                  (ii)      Linear      data  structure
C. LIFO                                   (iii) string function
D. prims algorithm                         (iv) minimum spanning tree

          a)     A- (iii), B-(ii), C-(i), D-(iv)
          b)     A- (ii), B-(ii), C-(iii), D-(iv)
          c)     A- (iii), B-(ii), C-(iv), D-(i)
          d)     A- (iii), B-(iv), C-(i), D-(ii)




                 PC Training Institute Ltd., An ISO-9001 Certified Organisation




                                                                                  14

More Related Content

PDF
Gate Computer Science Solved Paper 2007
PDF
Gate-Cs 2010
PDF
Gate-Cs 2007
PDF
Computer science sqp
PDF
1st Semester M Tech Computer Science and Engg (Dec-2013) Question Papers
PDF
05211201 A D V A N C E D D A T A S T R U C T U R E S A N D A L G O R I...
PDF
Gate-Cs 2009
PDF
7th Semester (December; January-2014 and 2015) Computer Science and Informati...
Gate Computer Science Solved Paper 2007
Gate-Cs 2010
Gate-Cs 2007
Computer science sqp
1st Semester M Tech Computer Science and Engg (Dec-2013) Question Papers
05211201 A D V A N C E D D A T A S T R U C T U R E S A N D A L G O R I...
Gate-Cs 2009
7th Semester (December; January-2014 and 2015) Computer Science and Informati...

What's hot (17)

PDF
Gate-Cs 1992
PDF
Gate-Cs 1997
PDF
Gate Previous Years Papers
PDF
Gate-Cs 1998
PDF
7th Semester (June; July-2015) Computer Science and Information Science Engin...
PDF
Ijmsr 2016-05
PDF
7th semester Computer Science and Information Science Engg (2013 December) Qu...
PDF
Lgm pakdd2011 public
PDF
7th Semester (Dec-2015; Jan-2016) Computer Science and Information Science En...
PDF
7th Semester (June-2016) Computer Science and Information Science Engineering...
DOC
Data structures question paper anna university
PDF
Sample Paper 2 Class XI (Computer Science)
PDF
L6
PDF
FP305 data structure june 2012
PDF
Radical expressions
PDF
Cs 2003
Gate-Cs 1992
Gate-Cs 1997
Gate Previous Years Papers
Gate-Cs 1998
7th Semester (June; July-2015) Computer Science and Information Science Engin...
Ijmsr 2016-05
7th semester Computer Science and Information Science Engg (2013 December) Qu...
Lgm pakdd2011 public
7th Semester (Dec-2015; Jan-2016) Computer Science and Information Science En...
7th Semester (June-2016) Computer Science and Information Science Engineering...
Data structures question paper anna university
Sample Paper 2 Class XI (Computer Science)
L6
FP305 data structure june 2012
Radical expressions
Cs 2003
Ad

Viewers also liked (9)

PDF
C mcq practice test 2
PDF
C mcq practice test 1
PDF
PDF
C programming & data structure [character strings & string functions]
PPTX
Stack Data structure
PPT
Introduction to MatLab programming
PPTX
Steve Jobs Inspirational Quotes
PPTX
STACKS IN DATASTRUCTURE
PDF
Deep C
C mcq practice test 2
C mcq practice test 1
C programming & data structure [character strings & string functions]
Stack Data structure
Introduction to MatLab programming
Steve Jobs Inspirational Quotes
STACKS IN DATASTRUCTURE
Deep C
Ad

Similar to C programming & data structure (20)

DOCX
Data structure
PDF
C aptitude 1st jan 2012
PDF
this pdf very much useful for embedded c programming students
PDF
Ds qb 2021 rma
PDF
Model question paper_mc0061
PDF
C Language MCQ Programming Theory Questions
PDF
ITI COPA Database Concepts MCQ PDF New Chapter
PDF
Data structure - mcqs
PDF
Gate Previous Years Papers
PDF
Java MCQ Important Questions and Answers
PDF
ITI COPA Java MCQ important Questions and Answers
PDF
NIMI COPA Question Bank Mock Test App MCQ
DOC
Ugcnet4 u
PDF
PDF
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
PDF
Cplus plus abd datastructure
PPTX
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
PDF
Gate-Cs 1994
PDF
Inter quiz
PDF
Data structure using c bcse 3102 pcs 1002
Data structure
C aptitude 1st jan 2012
this pdf very much useful for embedded c programming students
Ds qb 2021 rma
Model question paper_mc0061
C Language MCQ Programming Theory Questions
ITI COPA Database Concepts MCQ PDF New Chapter
Data structure - mcqs
Gate Previous Years Papers
Java MCQ Important Questions and Answers
ITI COPA Java MCQ important Questions and Answers
NIMI COPA Question Bank Mock Test App MCQ
Ugcnet4 u
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
Cplus plus abd datastructure
UGC-NET, GATE and all IT Companies Interview C++ Solved Questions PART - 2
Gate-Cs 1994
Inter quiz
Data structure using c bcse 3102 pcs 1002

Recently uploaded (20)

PPTX
Core Concepts of Personalized Learning and Virtual Learning Environments
PPTX
MICROPARA INTRODUCTION XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
PDF
Civil Department's presentation Your score increases as you pick a category
PDF
semiconductor packaging in vlsi design fab
PDF
English Textual Question & Ans (12th Class).pdf
PDF
M.Tech in Aerospace Engineering | BIT Mesra
PDF
FORM 1 BIOLOGY MIND MAPS and their schemes
PDF
Myanmar Dental Journal, The Journal of the Myanmar Dental Association (2013).pdf
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PDF
MICROENCAPSULATION_NDDS_BPHARMACY__SEM VII_PCI Syllabus.pdf
PDF
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
PPTX
Climate Change and Its Global Impact.pptx
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PDF
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
PDF
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
PDF
1.Salivary gland disease.pdf 3.Bleeding and Clotting Disorders.pdf important
PPTX
What’s under the hood: Parsing standardized learning content for AI
PPTX
RIZALS-LIFE-HIGHER-EDUCATION-AND-LIFE-ABROAD.pptx
PPTX
Education and Perspectives of Education.pptx
Core Concepts of Personalized Learning and Virtual Learning Environments
MICROPARA INTRODUCTION XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Civil Department's presentation Your score increases as you pick a category
semiconductor packaging in vlsi design fab
English Textual Question & Ans (12th Class).pdf
M.Tech in Aerospace Engineering | BIT Mesra
FORM 1 BIOLOGY MIND MAPS and their schemes
Myanmar Dental Journal, The Journal of the Myanmar Dental Association (2013).pdf
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
MICROENCAPSULATION_NDDS_BPHARMACY__SEM VII_PCI Syllabus.pdf
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
Climate Change and Its Global Impact.pptx
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
LIFE & LIVING TRILOGY- PART (1) WHO ARE WE.pdf
1.Salivary gland disease.pdf 3.Bleeding and Clotting Disorders.pdf important
What’s under the hood: Parsing standardized learning content for AI
RIZALS-LIFE-HIGHER-EDUCATION-AND-LIFE-ABROAD.pptx
Education and Perspectives of Education.pptx

C programming & data structure

  • 1. PC TRAINING INSTITUTE LIMITED BT0065 C PROGRAMMING & DATA STRUCTURE [1 mark each] 1) The digital implies that the information in t a) variables b) constants c) data types d) none of the above 2) There are_____ numbers of characters in C language. a) 32 b) 98 c) 32 d) 19 3) Flow chart has no startorno end symbols a) True b) False 4) In c language there are ____ basic data types. a) 3 b) 4 c) 2 d) 5 5) Decision making is done by if statement. a) True b) False 6) C language is a) General-purpose programming language. b) Block structured programming language c) Imperative computer programming language d) All of the above. 7) Using array one can declare and define multiple variables of a) The same type with one identifier. b) The different type with one identifier. c) The same type with different identifier. d) The different type with different identifier. 8) At the time of initialization of array, dimension is optional. a) False b) True 9) There are____ storage class in ‘C’ a) Three 1
  • 2. PC TRAINING INSTITUTE LIMITED b) Four c) Two d) Five 10) _____ is a self-contained block of statements that are perform a coherent task of some kind a) Function b) Array c) Structure d) None of the above. 11) Methods of calling a function are: a) No argument No return value. b) No argument with Return value. c) Argument no return value. d) Argument with return value. e) All of the above 12) A structure is a method of packing data of -- a) same type b) different type c) both a and b d) None of the above. 13) C programming language was developed by a) Dennis Ritchie b) Ken Thompson c) Bill Gates d) Peter Norton 14)C is a_________ language a) High level b) low level c) Middle level d) Machine language 15) Pointers is a special type of variable which is used to hold the ____ of variable a) Pointer b) Address c) File d) None of the above 16) While using pointers 2
  • 3. PC TRAINING INSTITUTE LIMITED a) One pointer can hold only one address at a time. b) Before use, pointer must be defined. c) Pointer hold only address, not the value. d) All of the above. 17)Memory allocation at the runtime is known as a) Static memory allocation b) Dynamic memory allocation c) Paging d) None of the above 18)Memory allocation at the compile time is known as a) Static memory allocation b) Dynamic memory allocation c) Paging d) None of the above 19)To deallocate the memory space the function ___ is used a) Calloc() b) Free() c) Malloc() d) None of the above. 20) Structure initialization is not possible. (True/False) 21)Union and structure are same except storage allocation. (True/False) 22)To write to a new file or modify the contents of an existing file, you must first a) Open a file b) Close a file c) Read a file d) Write a file 23)____ mode to truncate to 0 length, if existent, r create text file for update over bibary file. a) “w” b) “rb+” c) “wb+” d) “w+” 24)“w+” and “wb+” are same about it operation. (True/False) 25) putc() and puts() are the same in nature. (True/False) 26)Which escape character can be used o beep from speaker in C? 3
  • 4. PC TRAINING INSTITUTE LIMITED a) a b) b c) m d) c 27)Maximum size of the double variable is: a) 1 byte b) 4 byte c) 8 byte d) 16 byte The operator & is used for a) Bitwise AND b) Bitwise OR c) Logical AND d) Logical OR 28)The operator | is used for a) Bitwise AND b) Bitwise OR c) Logical AND d) Logical OR 29)Which operator is used for increasing the value of the variable by one only a) a=a+1 b) a++ c) Both a & b d) None of the above 30)The operator + in b+=7 means a) b=7+7 b) b+7=b c) b=b+7 d) b=7 e) None of these 31)Which is a specification of a set of data and the set of operations that can be performed on the data? a) Linear data structure b) Homogenous data structure c) Abstract data structure d) None of the above. 4
  • 5. PC TRAINING INSTITUTE LIMITED 32)A data structure is said to be linear if its element forms a a) Sequence b) Linear list c) Both a & b d) None of these 33)Array is a) linear data structure b) non-linear data structure c) complex data structure d) none of these 34)Push operation is used to a) insert item into stack b) delete item from stack c) display item from stack d) None of the above. 35)A data structure , in which a element is added and removed only from one end is, is known as- a) queue b) stack c) array d) none of these 36)LIFO means : a) Least in Fast out b) Last in first order c) Last in first out d) none of these 37)FIFO means : a) Fast in Fast out b) First in first out c) First in first order d) none of these 38)If the stack is full, called: a) Stack Underflow b) Stack Overflow c) Outflow d) none of the above 5
  • 6. PC TRAINING INSTITUTE LIMITED 39)Array is a collection of a) identical data objects b) different data objects c) Both a and b d) None of these 40)Deque is a special type of data structure in which insertion and deletion will be done.. a) Either at rear end or at the front end of the queue. b) Neither at front end nor at the rear end of the queue. c) Either at front end or at the rear end of the queue. d) None of the above [2 marks each] 41)___ queue is a collection of elements such that each element has been assigned a priority a) priority queue b) Circular queue c) Deque d) none of these 42)Operation performed on linear lists: a) Insertion of nodes b) Deletion of nodes c) Retrieval of values d) Traversal in the list e) None of the above. 43)By Doubly Linked List, we can move in both the direction: (True/False) 1 4 44)Traverse the given tree using Pre-order. 4 Given tree: 8 4 4 3 1 1 3 9 3 6 3 7 6 6 5 9 7 3 4 9 2
  • 7. PC TRAINING INSTITUTE LIMITED a) 16 84 13 14 99 72 53 33 64 43 97 b) 14 13 84 16 53 72 99 64 33 43 97 c) 14 84 13 53 16 99 72 43 33 64 97 d) None of the above. 45)Convert the expression A+ (B*C-(D/E^F)*G*H to equivalent Postfix notation. a) ABC*DEF^/G*-H*+ b) ABC*DEF^+/GH*+ c) A- * BC^ + DE -+ FG d) AB+C - DE ^ - *+ FG 46)Perform Inorder traversal of following tree: A B C D E F G H I a) ABDGHCEIF b) GHDBIEFCA c) GDHBAEICF d) GHDBACIEF 47)In an AVL tree, the height of two child subtrees of any node differ by a) At most one b) At most two c) At least one d) At least two 48)True/false a) BST and AVL Tree are same.(True/False) b) Nodes that are not root and not leaf are called internal node. (True/False) 7
  • 8. PC TRAINING INSTITUTE LIMITED 49)BFT stands for a) Breadth-First Traversal b) Best-First Traversal c) Best-Fit Traversal d) None of the above. 50)The most efficient method of searching a sequential table without the use of auxiliary indices or tables is a) The Binay Search b) The Sequential Search c) Both a and b d) None of the above 51) Bubble sort has _______ a) Worst-case complexity O(n2) b) Best-case complexity O(n2) c) Average-case complexity O(n2) d) None of the above 52)True/False a) In quick sort, any element can be considered as pivot.(True/False) b) Selection sort and bubble sort having same time complexity(True/False) 53)The preorder traversal of a binary tree begin with- a) Traversal of the left sub tree in preorder b) Traversal of the right sub tree in preorder c) Processing of the root node d) None of the above 54)The stack can be implemented by using a) Arrays b) structures c) Union d) None of the above. 55)Link of linked list in C is of type a) unsigned integer b) Pointer to integer c) Pointer to struct d) None of the above 56)A technique, which collects all deleted space onto free storage list, is called- a) Static memory b) Garbage collection allocation c) Dynamic allocation d) None of the above 8
  • 9. PC TRAINING INSTITUTE LIMITED 57)Worst case efficiency of this search is n. a) Sequential search b) Binary search c) Indexed search d) None of these 58)Pointer when used in program after definition, then “*” means ___ and “&” means a) “value of” , “address of” b) “address of” , “value of” c) Both a & b d) None of the above. 59)Recursion is a tool to allow the programmer to reach a particular point called recursion point. It execute from a) Button to Top b) Top to Button c) Left to Right d) Right to Left 60)Disk operating system functions are: a) getdata() b) gettime() c) setdate() d) all of the above. (4 marks each) 61. Match making a) Macro i) unsigned long int b) Data type ii) 0 c) Single quotes iii) # d) Null iv) ‘’ a) a iii, b i, c iv, d ii b) a i, b ii, c i, d i c) a ii, b iii, c ii, d iii d) a iv, b iv, c iii, d iv 62 find indegree or outdegree of vertex 4 1 2 6 3 9
  • 10. PC TRAINING INSTITUTE LIMITED 5 4 a) 1, 1 b) 2, 1 c) 1, 2 d) 2, 2 63 Find the output of following: void main() { int age=18; if(age>=13 && age<=19) { printf(“Teen Ager”); } printf(“n Bye Bye”); } a) Teen ager b) Bye Bye c) Both a & b d) No output. 64 Find the output of following: void main() { int i; for(i=1;i=10;i++) { printf(“%d”,i); } } a) 1 2 3 4 5 6 7 8 9 10 b) 10 c) 1 d) no output 65 A…………….variable declaration looks normal, but is located outside any of the programs function. This is usually done at the beginning of the program file before the ………..but after…………….directives. a) Global, main (), preprocessor b) General, main (), Preprocessor c) General, main (), headerfile d) None of the above 10
  • 11. PC TRAINING INSTITUTE LIMITED 66. What will be the output of the following? #include<stdio.h> main() { int *i, *j, a=12, b=2,c; c=(a=a+b, b=a/b, a=a*b, b=a-b); i=&c; printf(“%d”,--(*i)); a) 93 b) 92 c) 91 d) 90. 67. The output of the following program: #include<stdio.h> main() { int a[3][3]=(3,7,8,6,5,4,3,5); printf (“%d”, (a[2][0]>a[0][0])? a[0][2]: a[2][2]); } a) 8 b) 7 c) 6 d) None of the above. 68. Find out put of the following: void main() { char str[]=”computer”; strupr(str); printf(“%c”,str); } a) COMPUTER b) computer c) Both a & b d) None of these. 69. Study the foll c program: #include<stdio.h> void main() { 11
  • 12. PC TRAINING INSTITUTE LIMITED int a=7,b=5; int x=3; switch(x) PC Training Institute Ltd., An ISO-9001 Certified Organisation { case 1: a=a-b;break; case 2: a=a+b;break; case 3: a=a*b;break; case 4: a=a/b;break; default :a=a; } printf(“%d”,a); } What will be the output: a) 37 b) 35 c) 11 d) None of these. 70. Study the following C program: #include<stdio.h> void main() { int I; clrscr(); printf(“list of even numbers b/w 1 to 100n”); for(i=5;i<=0;i--) { printf(“%d”,i) } } a) 54321 b) 12345 c) 12543 d) None of these. 71. What is the output of: #include<stdio.h> void main() { int a=7; for (;a>=1;) a--; } a) 1234567 b) 1234578 12
  • 13. PC TRAINING INSTITUTE LIMITED c) 7654321 d) no out put 72. Find output of following #include<stdio.h> void main() { auto int i=1; { auto int i=2; { auto int i=3; printf(“%d”,i); } printf(“%d”,i); } printf(“%d”,i); } a) 123 b) 3 21 c) 111 d) 333 73. C is ……………language, i.e. it recognizes a …………..case letter and it’s ……….case equivalent as being different. a) Case sensitive, upper, lower b) Not a case sensitive, upper, lower c) Not a case sensitive, predefined, user defined d) None of the above 74. Find output of following # include<stdio.h> external int x=10 void main() { int x=20; printf(“%d”,n); display(); } display() { printf(“%d”,x); } a) 10 10 b) 20 20 13
  • 14. PC TRAINING INSTITUTE LIMITED c) 10 20 d) 20 10 75. Match the followings: A. strrev() (i) Stack B. Queue (ii) Linear data structure C. LIFO (iii) string function D. prims algorithm (iv) minimum spanning tree a) A- (iii), B-(ii), C-(i), D-(iv) b) A- (ii), B-(ii), C-(iii), D-(iv) c) A- (iii), B-(ii), C-(iv), D-(i) d) A- (iii), B-(iv), C-(i), D-(ii) PC Training Institute Ltd., An ISO-9001 Certified Organisation 14