Select chapter



functions (3.papers)
loops (1.papers)
arrays (2.papers)
structures (3.papers)
unions (1.papers)
pointers (7.papers)
null pointers (1.papers)
strings (2.papers)
misc c concepts (1.papers)
Data structures (5.papers)
linked lists (3.papers)
trees (1.papers)
basics (5.papers)
Hide

Sponsored Links


  

c interview questions and answers

Show Answer
Share Facebook gmail Twitter
2
which of the below is not a data structure in c?
 
i. array
ii. string
iii. structure
iv. linked list
  1. none of them are data structure
  2. all of them are data structures
  3. linked list is not a data structure
  4. string is not a data structure
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
7
What is a stack in c?
  1. Stack data structure is based on Last In First Out approach
  2. Stack data structure is based on First In First Out approach
  3. Stack can follow either Last In First Out or First In First Out approach.
  4. option 3 is true, but not always
Show Answer
Share Facebook gmail Twitter
8
What is a Queue in c?
  1. Queue data structure is based on Last In First Out approach
  2. Queue data structure is based on First In First Out approach
  3. Queue can follow either Last In First Out or First In First Out approach.
  4. option 3 is true, but not always
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
14
which of the below options are true about a stack?
  1. push() operates at the first element of the list, and pop operates at the end of the list.
  2. push() operates at the last element of the list, and pop also operates at the end of the list.
  3. push() operates at the end element of the list, and pop operates at the first element of the list.
  4. push() operates at the first element of the list, and pop also operates at the first element of the list.
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
17
JVM (Java Virtual Machine) follows which architecture?
  1. JVM follows stack based architecture.
  2. JVM follows queue based architecture
  3. JVM follows both stack and queue based architecture
  4. none
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
20
What operation below function doing?
And which data structure is this?

#define MAX_ELE 10 //assume maximum elements is 10
int cur; //points to top element.

void fun(int ds[], int item)
{   
    if (cur == (MAX_ELE - 1))
        printf("overflow..can't insert")
    else
    {   
        ++cur;
        ds [cur] = item;
    }
}
  1. this function is trying to insert a new element into the array ds[]. here ds is an array data structure.
  2. this function is trying to insert a new element on top location of this data structure. So this is a stack.
  3. this function is trying to insert a new element on top location of this data structure. So this is a queue.
  4. both option 2 & 3 are correct, but we can't guess whether it is stack or queue, because insertion of new element in stack or queue happen on the top only (end).
Show Answer
Share Facebook gmail Twitter
Read more papers :