Viva Questions & Answers
Comprehensive Viva Preparation for All Subjects
Object Oriented Programming Through Java
Master Java OOPS Concepts for Your Viva
What is Java?
Answer: Java is an object-oriented, platform-independent programming language used to build applications.
Who developed Java, and in which year?
Answer: Java was developed by James Gosling at Sun Microsystems in 1995.
What are the main features of Java?
Answer: Simple, Object-Oriented, Platform Independent, Secure, Robust, Portable, and Multithreaded.
What is JVM, JRE, and JDK?
Answer:
- JVM (Java Virtual Machine): Runs Java bytecode
- JRE (Java Runtime Environment): Contains JVM and libraries to run Java programs
- JDK (Java Development Kit): Contains JRE + tools to develop Java programs
What is bytecode?
Answer: Bytecode is an intermediate code generated after compiling Java code. It is executed by JVM.
Why is Java platform independent?
Answer: Because Java programs are compiled into bytecode which can run on any system having JVM.
What is the difference between Java and C++?
Answer: Java is platform-independent and has no pointers; C++ is platform-dependent and supports pointers.
What is a class and an object?
Answer:
- Class: Blueprint or template of an object
- Object: Instance of a class
What is the difference between a constructor and a method?
Answer:
- Constructor: Used to initialize an object; same name as class
- Method: Used to perform operations; can have any name
What is the use of the new keyword?
Answer: It is used to create an object in Java.
Data Structures
Essential Data Structures Concepts for Viva
What is a data structure?
Answer: A data structure is a way to store and organize data efficiently for easy access and modification.
Why are data structures important?
Answer: They help in managing large amounts of data efficiently and improve program performance.
What are the types of data structures?
Answer:
- Linear: Array, Stack, Queue, Linked List
- Non-linear: Tree, Graph
What is the difference between linear and non-linear data structures?
Answer: Linear data structures arrange elements sequentially, while non-linear structures have hierarchical relationships.
What is an array?
Answer: An array is a collection of similar data elements stored at contiguous memory locations.
What are the advantages and disadvantages of arrays?
Answer:
- Advantages: Random access, cache friendliness
- Disadvantages: Fixed size, insertion/deletion is costly
What is a stack?
Answer: A stack is a linear data structure that follows LIFO (Last In, First Out) principle.
What are stack operations?
Answer: Push: Insert element, Pop: Remove element from top.
What is a queue?
Answer: A queue is a linear data structure that follows FIFO (First In, First Out) principle.
What is the difference between stack and queue?
Answer: Stack follows LIFO, Queue follows FIFO. Stack operations are at one end, queue operations are at both ends.
R Language
Statistical Computing with R Programming
What is R?
Answer: R is an open-source programming language and software environment for statistical computing and graphics.
Who developed R and when?
Answer: R was developed by Ross Ihaka and Robert Gentleman at the University of Auckland in 1993.
What are the main features of R?
Answer: Open-source, platform-independent, statistical analysis, graphics, data visualization, and extensible with packages.
What is R used for?
Answer: Data analysis, statistical computing, data visualization, machine learning, and reporting.
What is the difference between R and Python?
Answer: R is mainly for statistics and data analysis; Python is general-purpose and widely used in programming, web development, and data science.
How do you install R and RStudio?
Answer: Install R from CRAN, then install RStudio IDE to write and run R scripts easily.
What is CRAN?
Answer: CRAN (Comprehensive R Archive Network) is the official repository of R packages and source code.
What is the difference between R and RStudio?
Answer: R is the programming language and environment. RStudio is an IDE for writing and running R scripts.
What are vectors in R?
Answer: A vector is a one-dimensional array that holds elements of the same type (numeric, character, or logical).
What are data types in R?
Answer: Numeric, Integer, Character, Logical, Factor, Complex, and Raw.
Viva Preparation Tips
Maximize your performance with these expert tips
Understand Concepts
Don't just memorize answers. Understand the underlying concepts thoroughly.
Practice Speaking
Practice explaining concepts aloud to build confidence and clarity.
Time Management
Allocate specific time for each subject and stick to your schedule.