0% found this document useful (0 votes)
17 views8 pages

Cs Viva Questions

The document provides a comprehensive overview of C++ programming concepts, including shortcut keys, data structures, and basic programming principles. It covers topics such as classes, objects, inheritance, pointers, and HTML basics, along with definitions and examples. Key programming functions and their purposes, such as constructors and function overloading, are also explained.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views8 pages

Cs Viva Questions

The document provides a comprehensive overview of C++ programming concepts, including shortcut keys, data structures, and basic programming principles. It covers topics such as classes, objects, inheritance, pointers, and HTML basics, along with definitions and examples. Key programming functions and their purposes, such as constructors and function overloading, are also explained.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

VIVA QUESTIONS CS

TURBO C++ SHORTCUT KEYS


1) F2 : SAVE the c++ file.( filename.CPP)
2) F3 : OPEN the c++ file
3) ctrl + f9 : Run the c++ program.
Main() : program execution starts from main() function.
1) What is the extension of c++ program ?

Ans : .CPP ( filename.cpp)

2) What is the extension of HTML program ?


Ans : .html (filename.html)

• Father of Computer : Charles Babbage.

• C++ developed by : Bajarne Stroustrup.

• HTML was Created by Sir Tim Berners-Lee.

• HTML : Hyper Text Markup Language.

• HTTP : Hyper Text Transfer Protocol.

• DHTML : Dynamic Hypertext markup language.

• Endl : Ends line and go to next line.

• Clrscr() : clear the screen.

• Getch() : getcharacter.

• #include<iostream.h> : Holds Cin ,Cout information


• #include<conio.h> : It consists getch () and clrscr() function

• #include<iomanip.h> : it holds endl and setw objects

• .h indicates header file

• Cin : Read the values , Cout : Print statements

• SQL : Structured query language.

• Three control access specifiers

a) Private b) Public and c) Protected.

1) Define class ?

Ans : A class is a way of grouping objects having similar


characteristics.

Classes are user-defined data types.

2) Define object ?

ANS : An object is a collection of data members and associated


member function.

3) Why we use scope(::) resolution operator?

Ans : To define member function outside a class.

* The member of a class can be acessed using DOT(.) operator.

4) Data member : Describes the characteristics of a class.

5) Member function : set of operations that are performed on the


objects of the class.

6) Dynamic binding : It is process of connecting one program to


another at the time of its execution is called dynamic binding.
7) Manipulators : Manipulators are the function which can be used in
conjuction with the insertion (<<) and extraction(>>) operators on an
object.

example : Setw and endl.

8) Default acess modifier in a class is Private.

PROGRAM (1,2,3,4,5)

DATA STRUCTURES.
8) DATA STRUCTURE : A data structure is a specialized format for
organizing and storing data.

9) What are primitive data structures?

Ans : The data that are directly operated upon machine level
instructions are called primitive data structure.

Example: int , char, pointer, array etc.

10) Define array?

Ans : An array is a collection of homogeneous elements and the


elements are arranged one after another in adjacent memory
location.

11) Define Sorting?

Ans : The process of arrangement of data items in ascending or


descending order called sorting.

Example : Insertion Sort.


 Insertion sort : Insertion sort is a sorting algortihm that orders list
by repeatedly inserting elements into the correct position.

12) Define Searching ?

Ans : The process of finding the location of a data item.

Example : Binary search.

Binary Search : It is used to find the position of an element in the array


only if the array is sorted.

13) Define insertion ?

Ans : The Process of adding a new data item.

14) Define Deletion ?

Ans : The process of removing an existing data item from the given
collection of data item.

15) Traversal : The process of acessing each data item exactly once to
perform some operation is called Traversal.

16) what is Frequency of an element?

Ans : The numbers of times elements appears in a data set.

PROGRAM 6

SIMPLE INTERSET

17) Formula for finding simple interest

Si = (p*t*r)/100

P= principle amount , t= time , r = rate, Si=simple interest.


PROGRAM 8

FUNCTION OVERLOADING

18) Function overloading : “Two or more functions have two or more


functions have same name but differ in the number of arguments or
data type of arguments.

PROGRAM 9

INLINE FUNCTION

19) Inline Function : Inline function makes the compiler to replace a


function class with the body of the function.

Advantages of inline function

1) very efficient code can be generated.


2) The speed of execution of a program increases.
3) The readability of the program increases.

PROGRAM 10

CONSTRUCTOR

20) Constructor : “A Constructor is special member function that is


executed automatically whenever an object is created”.

RULES FOR WRITTING CONSTRUCTOR

1) CONSTRUCTOR name is same name as class name.

2) There is no return type used.

3)A constructor should be declared in public section

4) A constructor is invoked automatically whenever object is created.


Mention types of constructor :

I. Default constructor : A constructor which does not accept any


arguments is called a zero argument.

II. Parameterized constructor : A constructor that takes one or more


arguments is called parameterzed constroctor.

III. copy constructor : constructor using which one object can be


copied to another object.

21)What is meant by array of objects ?

Ans : It is a collrction of objects of same class type are called array of


objects.

PROGRAM 11

INHERITANCE

22) Inheritance : “Inheritance is the capability of one class to inherit the


Properties from another class”.

 Base Class : The class that inherit its property to another class is
called base class or super class.
 Derived class : A class that get inherited by the other class is
called derived class or sub class.

Advantages of inheritance
1) Reusing existing code
2) Memory utilization
3) Faster development time.
TYPES OF INHERITANCE

1) Single level inheritance


2) Multilevel inheritance
3) Multiple inheritance
4) Hierarchical inheritance
5) Hybrid inheritance

23) What is single level inheritance ?


Ans : If a class is derived from a single base class , it is called as
single level inheritance.

Program 12
pointers
24) Pointer : “A pointer is a variable which holdes the address of
another class”.

 Address operator in pointers &


 Pointer operator * (star)

25) What is static Memory?

Ans : it is a memory allocated to the variable during it’s declaration.

26)What is dynamic memory ?

Ans : It is a memory allocated to the variable during execution of a


program.
PROGRAM (11,12)

HTML

 What is the extension of html file?


Ans: .(dot)html
Example : filename.html

27) <TR> : Table Row.

<TD> : Table Data.

<TH> : Table Header.

<B> : Bold letter

<I> : Italic letter.

28) Name basic tags used in html?

Ans : <html> ,<body>, <head> , <title>, <p>, <h1>

29) what are types of listing ?

Ans : Orderd list (<ol>)

Unordered list (<ul>)

30) What is XML ?

Ans : extended markup language(XML) for documents containing


structured information.

You might also like