SlideShare a Scribd company logo
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
Ad

Recommended

Gate Computer Science Solved Paper 2007
Gate Computer Science Solved Paper 2007
Rohit Garg
 
Gate-Cs 2010
Gate-Cs 2010
Ravi Rajput
 
Gate-Cs 2007
Gate-Cs 2007
Ravi Rajput
 
Computer science sqp
Computer science sqp
Prasanth566435
 
1st Semester M Tech Computer Science and Engg (Dec-2013) Question Papers
1st Semester M Tech Computer Science and Engg (Dec-2013) Question Papers
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
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...
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...
guestd436758
 
Gate-Cs 2009
Gate-Cs 2009
Ravi Rajput
 
7th Semester (December; January-2014 and 2015) Computer Science and Informati...
7th Semester (December; January-2014 and 2015) Computer Science and Informati...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
Gate-Cs 1992
Gate-Cs 1992
Ravi Rajput
 
Gate-Cs 1997
Gate-Cs 1997
Ravi Rajput
 
Gate Previous Years Papers
Gate Previous Years Papers
Rahul Jain
 
Gate-Cs 1998
Gate-Cs 1998
Ravi Rajput
 
7th Semester (June; July-2015) Computer Science and Information Science Engin...
7th Semester (June; July-2015) Computer Science and Information Science Engin...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
Ijmsr 2016-05
Ijmsr 2016-05
ijmsr
 
7th semester Computer Science and Information Science Engg (2013 December) Qu...
7th semester Computer Science and Information Science Engg (2013 December) Qu...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
Lgm pakdd2011 public
Lgm pakdd2011 public
Yasuo Tabei
 
7th Semester (Dec-2015; Jan-2016) Computer Science and Information Science En...
7th Semester (Dec-2015; Jan-2016) Computer Science and Information Science En...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
7th Semester (June-2016) Computer Science and Information Science Engineering...
7th Semester (June-2016) Computer Science and Information Science Engineering...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
1
1
Dell R&D Bangalore, INDIA
 
Data structures question paper anna university
Data structures question paper anna university
sangeethajames07
 
Sample Paper 2 Class XI (Computer Science)
Sample Paper 2 Class XI (Computer Science)
Poonam Chopra
 
L6
L6
lksoo
 
FP305 data structure june 2012
FP305 data structure june 2012
Syahriha Ruslan
 
Radical expressions
Radical expressions
Sumra Farooq
 
Cs 2003
Cs 2003
Ravi Rajput
 
C mcq practice test 2
C mcq practice test 2
Aman Kamboj
 
C mcq practice test 1
C mcq practice test 1
Aman Kamboj
 
Matlab GUI
Matlab GUI
Omair Imtiaz Ansari
 
C programming & data structure [character strings & string functions]
C programming & data structure [character strings & string functions]
MomenMostafa
 
Stack Data structure
Stack Data structure
B Liyanage Asanka
 

More Related Content

What's hot (17)

Gate-Cs 1992
Gate-Cs 1992
Ravi Rajput
 
Gate-Cs 1997
Gate-Cs 1997
Ravi Rajput
 
Gate Previous Years Papers
Gate Previous Years Papers
Rahul Jain
 
Gate-Cs 1998
Gate-Cs 1998
Ravi Rajput
 
7th Semester (June; July-2015) Computer Science and Information Science Engin...
7th Semester (June; July-2015) Computer Science and Information Science Engin...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
Ijmsr 2016-05
Ijmsr 2016-05
ijmsr
 
7th semester Computer Science and Information Science Engg (2013 December) Qu...
7th semester Computer Science and Information Science Engg (2013 December) Qu...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
Lgm pakdd2011 public
Lgm pakdd2011 public
Yasuo Tabei
 
7th Semester (Dec-2015; Jan-2016) Computer Science and Information Science En...
7th Semester (Dec-2015; Jan-2016) Computer Science and Information Science En...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
7th Semester (June-2016) Computer Science and Information Science Engineering...
7th Semester (June-2016) Computer Science and Information Science Engineering...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
1
1
Dell R&D Bangalore, INDIA
 
Data structures question paper anna university
Data structures question paper anna university
sangeethajames07
 
Sample Paper 2 Class XI (Computer Science)
Sample Paper 2 Class XI (Computer Science)
Poonam Chopra
 
L6
L6
lksoo
 
FP305 data structure june 2012
FP305 data structure june 2012
Syahriha Ruslan
 
Radical expressions
Radical expressions
Sumra Farooq
 
Cs 2003
Cs 2003
Ravi Rajput
 
Gate Previous Years Papers
Gate Previous Years Papers
Rahul Jain
 
Ijmsr 2016-05
Ijmsr 2016-05
ijmsr
 
Lgm pakdd2011 public
Lgm pakdd2011 public
Yasuo Tabei
 
Data structures question paper anna university
Data structures question paper anna university
sangeethajames07
 
Sample Paper 2 Class XI (Computer Science)
Sample Paper 2 Class XI (Computer Science)
Poonam Chopra
 
FP305 data structure june 2012
FP305 data structure june 2012
Syahriha Ruslan
 
Radical expressions
Radical expressions
Sumra Farooq
 

Viewers also liked (9)

C mcq practice test 2
C mcq practice test 2
Aman Kamboj
 
C mcq practice test 1
C mcq practice test 1
Aman Kamboj
 
Matlab GUI
Matlab GUI
Omair Imtiaz Ansari
 
C programming & data structure [character strings & string functions]
C programming & data structure [character strings & string functions]
MomenMostafa
 
Stack Data structure
Stack Data structure
B Liyanage Asanka
 
Introduction to MatLab programming
Introduction to MatLab programming
Damian T. Gordon
 
Steve Jobs Inspirational Quotes
Steve Jobs Inspirational Quotes
InsideView
 
STACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURE
Archie Jamwal
 
Deep C
Deep C
Olve Maudal
 
C mcq practice test 2
C mcq practice test 2
Aman Kamboj
 
C mcq practice test 1
C mcq practice test 1
Aman Kamboj
 
C programming & data structure [character strings & string functions]
C programming & data structure [character strings & string functions]
MomenMostafa
 
Introduction to MatLab programming
Introduction to MatLab programming
Damian T. Gordon
 
Steve Jobs Inspirational Quotes
Steve Jobs Inspirational Quotes
InsideView
 
STACKS IN DATASTRUCTURE
STACKS IN DATASTRUCTURE
Archie Jamwal
 
Ad

Similar to C programming & data structure (20)

Ugcnet4 u
Ugcnet4 u
sadhi
 
Computer programming mcqs
Computer programming mcqs
saadkhan672
 
C aptitude 1st jan 2012
C aptitude 1st jan 2012
Kishor Parkhe
 
(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2
Pamidimukkala Sivani
 
this pdf very much useful for embedded c programming students
this pdf very much useful for embedded c programming students
pavan81088
 
Data structures and algorithms unit i
Data structures and algorithms unit i
sonalisraisoni
 
Long Quiz for Java Programming - Basics plus Array and looping .pptx
Long Quiz for Java Programming - Basics plus Array and looping .pptx
ArvieJayLapig
 
Data structure part 2
Data structure part 2
Knowledge Center Computer
 
Dfs analysis
Dfs analysis
Mukesh Tekwani
 
Model question paper_mc0061
Model question paper_mc0061
gurbaxrawat
 
CAPE Computer Science Unit 1 Paper 1 - Practice Paper
CAPE Computer Science Unit 1 Paper 1 - Practice Paper
Alex Stewart
 
Cs 62
Cs 62
Web Developer
 
Question đúng cnu
Question đúng cnu
PhamHoc
 
C and data structure
C and data structure
prabhatjon
 
DATA STRUCTURE CONTENT QUIZ II PPT.pptx
DATA STRUCTURE CONTENT QUIZ II PPT.pptx
Rajask16
 
Exam for c
Exam for c
vijasli25
 
Data structures and algorithms
Data structures and algorithms
Mohammad Usman
 
538034292-Data-Structure-Exam-Sample-2020.pdf
538034292-Data-Structure-Exam-Sample-2020.pdf
barsubiasarah
 
X Chapter 1 Problem Solving and Algorithm Designing.pdf
X Chapter 1 Problem Solving and Algorithm Designing.pdf
Amna Nawazish
 
Course module of DS
Course module of DS
PCTE
 
Ugcnet4 u
Ugcnet4 u
sadhi
 
Computer programming mcqs
Computer programming mcqs
saadkhan672
 
C aptitude 1st jan 2012
C aptitude 1st jan 2012
Kishor Parkhe
 
(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2
Pamidimukkala Sivani
 
this pdf very much useful for embedded c programming students
this pdf very much useful for embedded c programming students
pavan81088
 
Data structures and algorithms unit i
Data structures and algorithms unit i
sonalisraisoni
 
Long Quiz for Java Programming - Basics plus Array and looping .pptx
Long Quiz for Java Programming - Basics plus Array and looping .pptx
ArvieJayLapig
 
Model question paper_mc0061
Model question paper_mc0061
gurbaxrawat
 
CAPE Computer Science Unit 1 Paper 1 - Practice Paper
CAPE Computer Science Unit 1 Paper 1 - Practice Paper
Alex Stewart
 
Question đúng cnu
Question đúng cnu
PhamHoc
 
C and data structure
C and data structure
prabhatjon
 
DATA STRUCTURE CONTENT QUIZ II PPT.pptx
DATA STRUCTURE CONTENT QUIZ II PPT.pptx
Rajask16
 
Data structures and algorithms
Data structures and algorithms
Mohammad Usman
 
538034292-Data-Structure-Exam-Sample-2020.pdf
538034292-Data-Structure-Exam-Sample-2020.pdf
barsubiasarah
 
X Chapter 1 Problem Solving and Algorithm Designing.pdf
X Chapter 1 Problem Solving and Algorithm Designing.pdf
Amna Nawazish
 
Course module of DS
Course module of DS
PCTE
 
Ad

Recently uploaded (20)

The Man In The Back – Exceptional Delaware.pdf
The Man In The Back – Exceptional Delaware.pdf
dennisongomezk
 
ABCs of Bookkeeping for Nonprofits TechSoup.pdf
ABCs of Bookkeeping for Nonprofits TechSoup.pdf
TechSoup
 
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
parmarjuli1412
 
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
ChristinaFortunova
 
ROLE PLAY: FIRST AID -CPR & RECOVERY POSITION.pptx
ROLE PLAY: FIRST AID -CPR & RECOVERY POSITION.pptx
Belicia R.S
 
What are the benefits that dance brings?
What are the benefits that dance brings?
memi27
 
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
razelitouali
 
Chalukyas of Gujrat, Solanki Dynasty NEP.pptx
Chalukyas of Gujrat, Solanki Dynasty NEP.pptx
Dr. Ravi Shankar Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
How to Manage Multi Language for Invoice in Odoo 18
How to Manage Multi Language for Invoice in Odoo 18
Celine George
 
Paper 109 | Archetypal Journeys in ‘Interstellar’: Exploring Universal Themes...
Paper 109 | Archetypal Journeys in ‘Interstellar’: Exploring Universal Themes...
Rajdeep Bavaliya
 
Non-Communicable Diseases and National Health Programs – Unit 10 | B.Sc Nursi...
Non-Communicable Diseases and National Health Programs – Unit 10 | B.Sc Nursi...
RAKESH SAJJAN
 
GEOGRAPHY-Study Material [ Class 10th] .pdf
GEOGRAPHY-Study Material [ Class 10th] .pdf
SHERAZ AHMAD LONE
 
FIRST DAY HIGH orientation for mapeh subject in grade 10.pptx
FIRST DAY HIGH orientation for mapeh subject in grade 10.pptx
GlysdiEelesor1
 
PEST OF WHEAT SORGHUM BAJRA and MINOR MILLETS.pptx
PEST OF WHEAT SORGHUM BAJRA and MINOR MILLETS.pptx
Arshad Shaikh
 
june 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptx
roger malina
 
ICT-8-Module-REVISED-K-10-CURRICULUM.pdf
ICT-8-Module-REVISED-K-10-CURRICULUM.pdf
penafloridaarlyn
 
What is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptx
Ramakrishna Reddy Bijjam
 
“THE BEST CLASS IN SCHOOL”. _
“THE BEST CLASS IN SCHOOL”. _
Colégio Santa Teresinha
 
Measuring, learning and applying multiplication facts.
Measuring, learning and applying multiplication facts.
cgilmore6
 
How to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 Slides
Celine George
 
The Man In The Back – Exceptional Delaware.pdf
The Man In The Back – Exceptional Delaware.pdf
dennisongomezk
 
ABCs of Bookkeeping for Nonprofits TechSoup.pdf
ABCs of Bookkeeping for Nonprofits TechSoup.pdf
TechSoup
 
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
THERAPEUTIC COMMUNICATION included definition, characteristics, nurse patient...
parmarjuli1412
 
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
FEBA Sofia Univercity final diplian v3 GSDG 5.2025.pdf
ChristinaFortunova
 
ROLE PLAY: FIRST AID -CPR & RECOVERY POSITION.pptx
ROLE PLAY: FIRST AID -CPR & RECOVERY POSITION.pptx
Belicia R.S
 
What are the benefits that dance brings?
What are the benefits that dance brings?
memi27
 
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
Energy Balances Of Oecd Countries 2011 Iea Statistics 1st Edition Oecd
razelitouali
 
How to Manage Multi Language for Invoice in Odoo 18
How to Manage Multi Language for Invoice in Odoo 18
Celine George
 
Paper 109 | Archetypal Journeys in ‘Interstellar’: Exploring Universal Themes...
Paper 109 | Archetypal Journeys in ‘Interstellar’: Exploring Universal Themes...
Rajdeep Bavaliya
 
Non-Communicable Diseases and National Health Programs – Unit 10 | B.Sc Nursi...
Non-Communicable Diseases and National Health Programs – Unit 10 | B.Sc Nursi...
RAKESH SAJJAN
 
GEOGRAPHY-Study Material [ Class 10th] .pdf
GEOGRAPHY-Study Material [ Class 10th] .pdf
SHERAZ AHMAD LONE
 
FIRST DAY HIGH orientation for mapeh subject in grade 10.pptx
FIRST DAY HIGH orientation for mapeh subject in grade 10.pptx
GlysdiEelesor1
 
PEST OF WHEAT SORGHUM BAJRA and MINOR MILLETS.pptx
PEST OF WHEAT SORGHUM BAJRA and MINOR MILLETS.pptx
Arshad Shaikh
 
june 10 2025 ppt for madden on art science is over.pptx
june 10 2025 ppt for madden on art science is over.pptx
roger malina
 
ICT-8-Module-REVISED-K-10-CURRICULUM.pdf
ICT-8-Module-REVISED-K-10-CURRICULUM.pdf
penafloridaarlyn
 
What is FIle and explanation of text files.pptx
What is FIle and explanation of text files.pptx
Ramakrishna Reddy Bijjam
 
Measuring, learning and applying multiplication facts.
Measuring, learning and applying multiplication facts.
cgilmore6
 
How to Create an Event in Odoo 18 - Odoo 18 Slides
How to Create an Event in Odoo 18 - Odoo 18 Slides
Celine George
 

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