Explore topic-wise InterviewSolutions in Current Affairs.

This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.

1.

Pick the odd one out and give reason: (a) CREATE (b) SELECT (c) UPDATE (d) INSERT

Answer»

(a) CREATE, It is a DDL command the others are DML commands

2.

Explain second generation computers.

Answer»

Second generation computers were transistor based machines. They used the stored program concept. Programs were written in assembly language. They were smaller in size, less expensive and required less maintenance than the first j generation computers. The computation time was j in microseconds.

3.

The........operator of SQL is used to match a pattern with the help of %. February 2009 (a) BETWEEN (b) AND (c) LIKE (d) OR

Answer»

The LIKE operator of SQL is used to match a pattern with the help of %. February 2009

4.

What are the logical operators used in SQL?

Answer»

And, Or, Not.

5.

The SQL operator …………….. is used with pattern matching.

Answer»

Like Operator

6.

Distinguish between DISTINCT and UNIQUE in SQL.

Answer»

DISTINCT – This keyword is used to avoid duplicate values in a column of a table.

Unique – It ensures that no two rows have the same value in a column.

7.

Suppose we want to include a column in a table in which serial numbers are to be stored automatically on adding new records. Which constraint is to be used for that column during table creation?

Answer»

The constraint Auto increment is used.

8.

Explain how Python is interpreted.

Answer»

Python program runs directly from the source code. Each type Python programs executed code is required. Python converts source code written by the programmer into intermediate language which is again translated into the native language/ machine language that is executed. So Python is an interpreted language.

9.

Write features of first generation of computers.

Answer»

The first generation of computers :

  • The main component of the first generation of computers was a vacuum tube.
  • The size of computers was very big.
  •  Huge consumption of electricity (approx. 60 KW).
  • It was a giant machine 30 x 50 feet long, weighed 30 tons, containing 20,000 values & 70,000 resistors.
  • Programming language was the machine level. Example: ENIAC, UNIVAC-I, EDSAC etc.
10.

What are the disadvantages of third generation computers ?

Answer»

The disadvantages of third generation computers are as follow :

1. Air conditioning is required in many cases.

2. The highly sophisticated technology required for the manufacturing of IC chips.

11.

Explain third generation computers.

Answer»

Third generation computers were characterized by the use of IC. They consume less power and required low maintenance compared to their predecessors. High-level languages were used for programming. The computation time was in nanoseconds. These computers were produced commercially.

12.

Explain fifth generation computers.

Answer»

Fifth generation computers are capable of learning and self-organization. These computers use SLSI chips and have large memory requirements. They use parallel processing and are based on Artificial intelligence. The fifth generation computers are still being developing.

13.

The …………. operator pf SQL is used to match a pattern with the help of %. February 2009 (a) BETWEEN (b) AND (c) LIKE (d) OR

Answer»

The LIKE operator pf SQL is used to match a pattern with the help of %. February 2009

14.

A table is created in SQL with 10 records. Which SQL command is used to change the values in a column of specified flows? Write the format.

Answer»

UPDATE command is used for this.

Syntax : UPDATE<table name>set<column name>

=  value where condition.

15.

Can you find any alternate keys in the following table? Justify your answer.   Reg_no   Roll_no   Year    Name   1    12001Ramya   2    22001Resmi   3   32001Sheeba   4   42002Sona   5   52002Soumya

Answer»

The candidate key that is not the primary key is called the alternate key. Here the candidate keys are Reg.No, Roll No.+year, Roll No. + name. If we set Reg.No. as the primary key then the other keys are alternate keys.

16.

Which of the following clause is not used with SELECT command in SQL? (a) GROUP BY (b) WHERE(c) SET (d) ORDER BY

Answer»

(c) SET. This clause is used with UPDATE.

17.

Does Python allows you to assign a single value to several variables simultaneously ?

Answer»

Yes, Python allows you to assign a single value to several variables simultaneously.

18.

How is SQL different from other computer high-level languages?

Answer»

SQL means Structured Query Language. It is a relational database language, not a programming language like other high-level languages. It provides facilities to create a table, insert data into a table, retrieve information from a table, modify data in the table, etc.

19.

Write various python modules convert the list to generate the output “one, two, three” ? a = [‘one’, ‘two’, ‘three’]

Answer»

> > > a = [‘one’,’two’,’three’] 

>>> ‘,’.join(a) 

‘one,two,three’

20.

Do Python variables have to be explicitly declared to reserve memory space ?

Answer»

yes Python variables have to be explicitly declared to reserve memory space ?

21.

Expand the IOCS.

Answer»

IOCS stands for Input-Output Control System.

22.

Write the features of third generation of computers.

Answer»

The third generation of computers :

  • The main component of third generation computers were integrated circuits(IC’s) known as chips.
  • More reliable computers, less expensive and faster in comparison to previous generations. Examples: IBM-360 Series, ICL1900 Series, Honey well Model 316.
23.

What do you mean by fourth generation computers ?

Answer»

Fourth generation computers used microprocessors which were designed using the LSI and VLSI technology. The computers became small, portable, reliable and cheap. The computation time is in Pico-seconds. They became available both to the home user and for commercial use.

24.

……… operator in SQL is used with wild card characters for selection of records. (a) LIKE (b) IN (c) NOT IN (d) IN and NOT IN

Answer»

Correct answer is (a) LIKE

25.

Find the odd one out.(a)Oracle(b) SQL Server (c) DDL (d) MySql

Answer»

Answer is DDL

26.

How do we share global variables across modules in Python?

Answer»

We can create a config file & store the entire global variable to be shared across modules or script in it. By simply importing config, the entire global variable defined. It will be available for use in other modules.

 For example we want a, b & c to share between modules. config.py : 

a = 0 

b = 0 

c = 0 modulel.py: 

import config 

config.a = 1 

config.b = 2 

config.c = 3 

• print ” a, b & c are : ” , config.a, config.b, config.c

27.

What is “None” literal in Python ?

Answer»

Python has one special literal called ‘None’. The ‘None’ literal is used to indicate something that has not yet been created. It is also used to indicate the end of lists in Python.

28.

What are literals in Python ? How many types of literals are allowed in Python ?

Answer»

Literals mean constants i.e. the data items that never change value during a program run. Python allow five types of literals :

1.  String literals

2.  Numeric literals

3.  Boolean literals

4.  Special literal (None)

5.  Literal collections like tuples, lists etc.

29.

Write features of fourth generation of computers.

Answer»

The fourth generation of computers :

  • The main component for this generation computers is VLSIC (Very Large Scale Integrated Circuits), known as microchips consisting of a packing of about 50000 transistors.
  • Computer cost reduced up to a great extent.
  • Faster access facility and processing speed.
  •  Many powerful operating systems were developed.
  • Multimedia computers are in existence.
30.

What do you mean by super computers ? What was the purpose to develop super computers ?

Answer»

Super Computers: Supercomputers are the most powerful computers among digital computers. A supercomputer consists of several processors running together making them immensely faster and powerful. These computers are capable of handling ’v 2 amounts of data for calculation and storage A supercomputer has the capacity equal to that of 40,000 microcomputers. 

These computers are mainly used in areas like weather forecasting, nuclear science research, aerodynamic modeling, meteorology etc. 

Examples: CRAY X-MP/14, CDC – 205, ETA GF – 10, NEC SX – 2, PARAM, ANURAG. 

PARAM and ANURAG are supercomputers produced by India and exported to many European countries.

31.

Write a query on the CUSTOMER table whose output will exclude all customers with a RATING &lt;=100, unless they are located in Kochi.

Answer»

Select * from CUSTOMER where RATING <=100 and Place= ‘Kochi’

32.

While inserting records into a table, Raju finds it is not possible to give more than 20 characters in the ‘name’ field. How can you help Raju solve this problem?

Answer»

Using ALTER TABLE command he can modify the width of field so that it can accommodate more than 20 characters.

33.

How many types of strings are supported in Python ?

Answer»

Python allows two string types :

1.  Single line strings : Strings that are terminated in single line. For example : 

str = ‘Oswal Books’

2.  Multiple strings : Strings storing multiple lines of text. For example : 

str = ‘Owal \ 

Books’ 

or str = ” ” ” Oswal 

Books 

” ” “

34.

How many ways are there in Python to represent an integer literal ?

Answer»

Python allows three types of integer literals :

1.  Decimal (base 10) integer literals.

2.  Octal (base 8) integer literals.

3.  Hexadecimal (base 16) integer literals. For example, decimal 12 will be written as 14 as octal integer and as OXC as hexa decimal integer. (12)10 = (14)8 = (OXC)16. (as hexa decimal

35.

How do you make an array in Python?

Answer»

their time complexity. The primary difference is that a Python list can contain objects of many different types. The array module also provides methods for creating arrays of fixed types with compact representations, but they are slower to index than lists. Also note that the numeric extensions and others define array-like structures with various characteristics as well.

36.

After executing a query Mohan gets a message like ‘Table Altered’. What would have he done? Give the syntax.

Answer»

He would have used the ALTER TABLE command.

Syntax, ALTER TABLE <name>ADD/MODIFY (<column>);

37.

After executing a query Mohan gets a message like ‘Table Altered’. What would have he done? Give the syntax.

Answer»

He would have used the ALTER TABLE command. Syntax: 

ALTER TABLE ADD/MODIFY ();

38.

Pick the odd one out. (SELECT, UPDATE, DELETE, DROP TABLE)

Answer»

DROP TABLE is not in the sequence

39.

Does Python support data type conversion ?

Answer»

Yes, Python support data type conversion. To convert between built-in types, programmer simply use the type name as a function. There are several built-in functions to perform conversion from one data type to another. These functions return a new object represting the converted value.

 Function           Description
int (x  [base])Converts x to an integer, base specifies the base if x is a string.
long [x [, base])Converts x to a long integer, base specifies the base if x is a string.
float (x)Converts x to a floatingpoint number.
complex (real, [ing])Creates a complex number.
str (x)Converts object x to a string representation.
repr (x)Converts object x to an expression string.
tuple (x)Converts x to a tuple.
list (x)Converts x to a list.
chr (xConvets an integer to a character.
unichr (x)Converts an integer to a Unicode character.
diet (x)Creates a disetionary, x must be a sequence of tuples.
set (x)Converts x to a set

40.

What is used to represent Strings in Python ?

Answer»

Using Single Quotes (‘) 

You can specify strings using single quotes such as ‘Quote me on this’. All white space i.e. spaces and tabs are preserved as it is. 

Using Double Quotes (”) 

Strings in double quotes work exactly the same way as strings in single quotes. 

An example  is “What’s your name?” 

Using Triple Quotes o(”’ or ” ” “) 

You can specify multi-line strings using triple quotes. You can use single quotes and double quotes freely within the triple quotes. An exampl is 

"‘This is a multi-line string. This is the first line. This is the second line. 

“What’s your name?,” I asked. 

He said “syed saif naqvi.”

41.

What is the use of  "-" operator?

Answer»

The "-" operator subtracts right hand operand from left hand operand.

42.

During discussion one student said that DELETE and DROP TABLE commands are same. Do you agree with that? Justify.

Answer»

No, DROP TABLE removes a table entirely from the database whereas DELETE command deletes only records from an existing table.

43.

1. Pick odd one out . DROP TABLE, DELETE, ALTER TABLE, CREATE VIEW 2. Justify your answer

Answer»

1. DELETE 

2. All others are DDL commands

44.

1. Pick odd one out. DROP TABLE, DELETE, ALTER TABLE, CREATE VIEW 2. Justify your answer

Answer»

1. DELETE 

2. All others are DDL commands

45.

What is the use of 7/” operator?

Answer»

The 7/” operator results is the quotient in which the digits after the decimal point are removed.

46.

1. Classify the following SQL commands. Create table, Insert Into, AlterTable, Delete, Up-date, Drop Table, Select.2. List the features of each category

Answer»

1. DDL – Create Table, Alter Table, Drop Table. 

DML- Insert Into, Delete, Update, Select. 

2. DDL – DDL means Data Definition Language. It is used to create the structure of a table, modify the structure of a table and delete the structure of a table. DML -DML means Data Manipulation Language. It is used to insert records into a table, modify the records of a table, delete the records of a table and retrieve the records from a table.

47.

Explain the available database integrity constraints.

Answer»

1. NOT NULL: it species that a column can never have null values, i.e., not empty 

2. UNIQUE: it ensures that no two rows have same value in the specied column. 

3. PRIMARY KEY: it declares a column or a set of columns as the primary key of the table. This constraint makes a column NOT NULL and UNIQUE. 

4. DEFAULT: it sets a default value for a column when the user does not enter a value for that column. 

5. Auto_increment: This constraint is used to perform auto increment the values in a column. That automatically generates serial numbers. Only one auto-increment column per table is allowed.

48.

___________ describes the method of storing and retrieving the data. (A) Model (B) Data model (C) Storage and Processing (D) Relational data model

Answer»

Correct option is  (B) Data model

49.

1. The data model describes the method of storing and retrieving the data.2. The relational data model is the primary data model, which is used widely around the world for data storage and processing.

Answer»

1. True

2. True

50.

Which component of DBMS provides interfaces with programming Languages ________.

Answer»

Which component of DBMS provides interfaces with programming Languages DML.