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.

What are the three types of key entry modes available in 8279?

Answer»

MODES OF OPERATION INPUT (KEYBOARD) MODE 

Three input modes: 

1. Scanned keyboard mode : allows key matrix to be interfaced either in encoded mode or decoded mode . In decoded mode 4 x 8 matrix is interfaced and in encoded mode 8 x 8 keyboard is interfaced. The code key pressed with CNTL and SHIFT is stored in FIFO RAM. 

2 .scanned sensor mode : in encoded mode 8 x 8 sensor matrix and in decoded mode 4 x 8 sensor matrix is interfaced 

3. Strobbed input : if control line goes low data on return line is stored in FIFO byte by byte.

2.

Pin configuration of 8279

Answer»

PIN CONFIGURATION OF 8279

DB0-DB7-Typeinput/output. These are bidirectional input/output lines.

CS(CHIP SELECT)

Type-input 

This is an active low input signal used to select the 8279 for normal read or write operation.

RD(READ)

type-input

This is an active low signal and a low on this i/p enables the 8279 to send data to the MP. 

WR-

When this pin is low MP will write data or control words into the 8279. 

A0-When it is high it indicates the transfer of a command or status info. and when this is low it indicates the transfer of data.

CLK-

Used to generate internal timings required by 8279. 

RESET-

During reset the clock presale is set to 31. 

IRQ-

When there is a data in FIFO sensor RAM the interrupt o/p goes high.

SL0-SL3

Used to scan the keyboard matrix and display digits.

RL0-RL7-

These lines are connected to one terminal of keys while the other terminal is connected to the decoded scan lines.

SHIFT-

In the scanned keyboard mode the status of the shift i/p line is stored along with each keys code in FIFO. 

CNTL/STB

Used as control i/p in the keyboard mode and stored in FIFO on a key closer.

BD

The o/ p pin is used to blank the display during the digit switching or by blanking display command. 

OUTA0-OUTA3 and OUTB0-OUTB3

These pins will work as the o/p ports .To scan the display & keyboard the data from these lines is synchronised with the scan lines. 

VCC-

This pin is used to provide power supply. 

GND-

This pin is used to provide ground.

3.

What is FIFO sensor ram and staus logic ?

Answer»

FIFO SENSOR RAM AND STATUS LOGIC

1. instrobbed input mode or keyboard mode, it will work like 8 byte FIFO RAM . 

2. The status logic generates an interrupt request after each FIFO read operation till FIFO is empty. 

3. in scanned sensor mode it acts as a sensor RAM mode each row of sensor RAM is loaded with sensor matrix

4.

Explain five string handling functions with syntax and examples. 

Answer»

1. Strlen( ) function:

It calculates the length of the given string and returns the number of characters in a string.

Syntax: integer variable = strlen(string);

Ex: length = strlen(“Bharath”);

Output : 7

2. Strcat() Function:

It adds the characters of one string to the end of another string. It is used to join the two strings together.

Syntax: strcat(stringl, string2); 

Ex: string1 = ”Bharath” string2 = ”Bhushan”, strcat(stringl, string2);

Output: Bharath Bhushan

3. Strrev() Function:

It reverses the characters in a string.

Syntax: strrev(string);

Ex: strrev(“ABCD”);

Output: DCBA

4. Strlwr() Function

Converts all characters in a string to lower (small letters) case. 

Syntax: strlwr(string);

Ex: strlwr(“BHARATH”)

Output: bharath

5. Strupr() Function

Converts all characters in a string to upper (capital letters) case.

Syntax: strupr(string);

Ex: strupr(“bharath”)

Output: BHARATH 

5.

Read the following function int fib(int n) { if (n<3)return 1; else return (fib(n – 1) + fib(n – 2)); } 1. What is the speciality of this function 2. How does it work? 3. What will be the output of the following code?

Answer»

1. This function is a recursive function. 

That means the function calls itself. 

2. It works as follows 

  • if i = 1, The function fib calls with value 1. i.e. fib(1) returns 1 
  • if i = 2, The function fib calls with value 2. i.e. fib(2) returns 1 
  • if i = 3, The function fib calls with value 3. i.e. fib(3) returns fib(2) + fib(1) i.e. it calls the function again. 

So the result is 1 + 1 = 2 

  • if i = 4, The function fib calls with value 4. i.e. fib(4) returns fib(3) + fib(2) i.e. it calls the function again. 

So the result is 2 + 1 = 3 

3. The output will be as follows 1 1 2 3

6.

What are the main features of 8255?

Answer»

Features 

1. High speed and low speed consumptions due to CMOS technology. 

2. It is PPI device . 

3. Power supply ranges 3 volts to 6 volts. 

4. PPI has 24 I/O programmable pins in groups of 12 pins which are arranged as 3 8 bit ports (PORT A,PORT B,PORT C). 

5. it is used for the interface to keyboard and parallel to printer port

7.

What is a 8355 programmable peripheral interface ?

Answer»

The programmable peripheral interface i s a low cost interfacing circuit used in many applications.its function is to perform input output operation.it contains 3 I/O ports, 24 I/O pins which can be programmed in three different modes.The various I/O operations can be performed by writing instructions in its internal control word register. Along basic I/O operation it also performs time delay generation counting generating signals and interrupts.

8.

Auto Indexing for String Instructions

Answer»

Auto Indexing for String Instructions:

SI & DI addresses are either automatically incremented or decremented based on the setting of the direction flag DF. 

When CLD (Clear Direction Flag) is executed DF=0 permits auto increment by 1. 

When STD (Set Direction Flag) is executed DF=1 permits auto decrement by 1. 

35

Mnemonic Meaning Format Operation Flags affected 

CLD Clear DF CLD (DF) ← 0 

DF STD Set DF STD (DF) ← 1 DF 

1. LDS Instruction: 

LDS register, memory (Loads register and DS with words from memory) This instruction copies a word from two memory locations into the register specified in the instruction. It then copies a word from the next two memory locations into the DS register. LDS is useful for pointing SI and DS at the start of the string before using one of the string instructions. LDS affects no flags. 

Example 1 :LDS BX [1234] 

Copy contents of memory at displacement 1234 in DS to BL. Contents of 1235H to BH. 

Copy contents at displacement of 1236H and 1237H is DS to DS register. 

Example 2 : LDS, SI String – Pointer

(SI) ← [String Pointer] 

(DS) ← [String Pointer +2] 

DS, SI now points at start and desired string

LEA Instruction : 

Load Effective Address (LEA register, source) 

This instruction determines the offset of the variable or memory location named as the source and puts this offset in the indicated 16 bit register. 

LEA will not affect the flags. 

Examples : 

LEA BX, PRICES 

Load BX with offset and PRICES in DS 

LEA BP, SS : STACK TOP 

Load BP with offset of stack-top in SS 

LEA CX, [BX] [DI] 

Loads CX with EA : (BX) + (DI) 

36 

3. LES instruction : 

LES register, memory

Example 1: LES BX, [789A H] 

(BX) ← [789A] in DS 

(ES) ← [789C] in DS 

Example 2 : LES 

DI, [BX] (DI) ← [BX] in DS 

(ES) ← [BX+2] in DS

9.

Repeat String : REP

Answer»

Repeat String : REP

The basic string operations must be repeated to process arrays of data. This is done by inserting a repeat prefix before the instruction that is to be repeated.

Prefix REP causes the basic string operation to be repeated until the contents of register CX become equal to zero. Each time the instruction is executed, it causes CX to be tested for zero, if CX is found to be nonzero it is decremented by 1 and the basic string operation is repeated. 

10.

Flag Control Instructions 

Answer»

Flag Control Instructions :

Mnemonic Meaning Operation Flags affected 

LAHF Load AH from flags (AH)←Flags None 

SAHF Store AH into flags (flags) ← (AH) SF,ZF,AF,PF,CF 

CLC Clear carry flag (CF) ← 0 CF 

STC Set carry flag (CF) ← 1 CF 

CMC Complement carry flag (CF) ← (CF) CF 

CLI Clear interrupt flag (IF) ← 0 IF 

STI Set interrupt flag (IF) ← 1 IF 

Fig. : Flag control Instructions 31 

The first two instructions LAHF and SAHF can be used either to read the flags or to change them respectively notice that the data transfer that takes place is always between the AH register and flag register. For instance, we may want to start an operation with certain flags set or reset. Assume that we want to preset all flags to logic 1. To do this we can first load AH with FF and then execute the SAHF instruction.

Example :Write an instruction sequence to save the contents of the 8086’s flags in memory location MEM1 and then reload the flags with the contents of memory location MEM Assume that MEM1 and MEM2 are in the same data segment defined by the current contents of DS. 

LAHF : Load current flags in AH register 

MOV (MEM1), AH : Save in (MEM1) 

MOV AH, (MEM2) : Copy the contents of (MEM2) 

SAHF : Store AH contents into the flags.

11.

Load and store strings

Answer»

Load and store strings :(LOD SB/LOD SW and STO SB/STO SW) LOD SB: 

Loads a byte from a string in memory into AL. The address in SI is used relative to DS to determine the address of the memory location of the string element. 

(AL) ← [(DS) + (SI)] 

(SI) ← (SI) + 1 

LOD SW : The word string element at the physical address derived from DS and SI is to be loaded into AX. SI is automatically incremented by 

(AX) ← [(DS) + (SI)] 

(SI) ← (SI) + 2 

STO SB : Stores a byte from AL into a string location in memory. This time the contents of ES and DI are used to form the address of the storage location in memory 

[(ES) + (DI)] ← (AL) 

(DI) ← (DI) + 1 

STO SW :[(ES) + (DI)] ← (AX) 

(DI) ← (DI) + 2 

Mnemonic Meaning Format Operation Flags affected 

MOV SB 

Move 

String 

Byte 

MOV 

SB 

((ES)+(DI))←((DS)+(SI)) 

(SI)←(SI) m 1 

(DI) ← m 1 

None 

MOV SW 

Move 

String 

Word 

MOV 

SW 

((ES)+(DI))←((DS)+(SI)) 

((ES)+(DI)+1)←(DS)+(SI)+1) 

(SI) ← (SI) m 2 

(DI) ← (DI) m 2 

None 

LOD SB /

LOD SW 

Load 

String 

LOD 

SB/

 LOD 

SW 

(AL) or (AX) ←((DS)+(SI)) 

(SI)←(SI) m 1 or 2 

None 

33 

STOSB/ 

STOSW 

Store 

String 

STOSB/ 

STOSW

((ES)+(DI))←(AL) or (AX) 

(DI) ← (DI) 71 or 2 

None

12.

Explain Integrated Digital Electronics (IDE) port, Accelerated Graphics Port (AGP) and Small Computer System Interface (SCSI) port.

Answer»

1. Integrated Digital Eelectronics (IDE) port:

IDE devices like Harddisk drives, CD-ROM drives are connected via 40-pin ribbon cable.

2. Accelerated Graphics Port (AGP):

The AGP is an advanced port designed for Video cards and 3D accelerators designed by Intel. AGP is to provide enhanced graphic accelerator cards, thus enhancing the picture quality of the screen.

3. Small Computer System Interface (SCSI) port:

This port is used for adding external devices such as high-speed hard disks, CD-ROM drives, scanners etc., These ports are expensive but does fast data transfers.

13.

Generally, a computer has integrated graphics to render images on a screen. Explain why would one want to add a graphics card?

Answer»

A graphics card has its own RAM, + Graphics processing unit (GPU) , that renders higher quality images , and could increase overall performance of PC as it takes load off the CPU to process graphics and frees up computer’s RAM, It also comes with more features such as Virtual Reality capability.

14.

The complexity of adding two matrices of order m*n is(A) m + n(B) mn(C) max(m, n)(D) min(m, n)

Answer»

Correct option - (B) mn

15.

A variable or a function declared out side of all the functions is have ........... scope.

Answer»

A variable or a function declared out side of all the functions is have global scope.

16.

A variable or a function declared within a function is have .......... scope.

Answer»

A variable or a function declared within a function is have local scope.

17.

What is a destructor? Which operator is used with destructor?

Answer»

It is a special member function that destroys the objects that have been created by a constructor when they no longer required. The operator tilde sign (~) is used with destructor.

18.

Define the term ‘topology’ of computer networks.

Answer»

It is the geometric arrangement of a computer system in a network. Common topologies include a linear bus, star, ring, and ring.

19.

Name the streams generally used for file I/O.

Answer»

The streams generally used for file I/O is input stream, output stream, and error stream.

20.

Define data mining.

Answer»

It is the process of discovering interesting knowledge, such as patterns, associations, changes, anomalies from large amounts of data stored in databases using pattern recognition technologies as well as statistical and mathematical techniques.

21.

In the expansion of `(3sqrt4+1/(4sqrt6))^20`A. (i),(iii)B. (ii),(iii)C. (i),(ii)D. All three

Answer» Correct Answer - 2
`T _(r+1)=""^(20)Cr.4^((20-r)/(3))6^((-r)/(4),r=0`
`(20-r)/(3),(r)/(4)` both must be intergers.
`therefore r=8,20`
` therefore 2 Rational Terms `
& 19 Irrational Terms
Also middle term is Irrational .
22.

`int_(1)^(e){((logx-1))/(1+(logx)^(2))}^(2)`dx is equal toA. `e/2`B. `1/2`C. `(e-2)/2`D. None of these

Answer» Correct Answer - 3
`I=underset(1)overset(e)int[((logx-1))/(1+(log)^(2))]^(2)dx`
put log x=t`rArrx=e^(t)`
`dx=e^(1)dt`
`I=underset(0)overset(1)inte^(1){(t-1)/(1-t^(2))}^(2)dt`
`=underset(0)overset(1)inte^(t)[1/(1+t^(2))-(2t)/(1+t^(2))^(2)}dt`
`=[(e^(1))/(1+t^(2))]_(0)^(1)=e/2-1=(e-2)/2`
23.

Mr. Dixon declared a variable as follows int 9age. Is it a valid identifier. If not briefly explain the rules for naming an identifier

Answer»

It is not a valid identifier because it violates the rule. 

The rules for naming an identifier is as follows. 

1) It must be start with a letter(alphabet) 

2) Under score can be considered as a letter 

3) White spaces and-special characters cannot be used. 

4) Key words cannot be considered as an identifier

24.

What are variables? What are the rules to be followed while naming a variable. Give example.

Answer»

A variable is a placeholder for data that can change its value during program execution. Technically, a variable is the name for a storage location in the computer's internal memory.

1. Variable names can begin with either an alphabetic character, an underscore (_), or a dollar sign ($). However, convention is to begin a variable name with a letter. They can consist of only alphabets, digits, and underscore. 

2. Variable names must be one word. Spaces are not allowed in variable names. Underscores are allowed. “total marks” is fine but “total marks” is not. 

3. Variable Name must not be a reserved word. 

For example - int. 

4. Java is a case-sensitive language. Variable names written in capital letters differ from variable names with the same spelling but written in small letters.

int num1, num2, num3;

25.

Mention different types of errors. 

Answer»

The different program errors are as follows:

1. Syntax error:

It occurs when there is a violation in the grammatical rules of a programming language’s instructions. It happens at the time of compilation. Such errors need to be rectified before proceeding further.

2. Semantic errors:

An error, which occurs due to the incorrect logic in a solution is called semantic error. It also occurs due to wrong use of grammar in the program?

3. Runtime Error:

It occur at run-time. Such error cause a program to end abruptly or even cause system shut-down. Such errors are hard to detect and are known as ‘Bugs’

4. Logical Error :

It may happen that a program contains no syntax or run-time errors but still it doesn’t produce the correct output. It is because the developer has not understood the problem statement properly. These errors are hard to detect as well. It may need the algonithm to be modified in the design phase and changing sources code.

26.

Give any three types of operating systems.

Answer»

Single user operating system, Batch operating system, Distributed operating system and network operating system

27.

Name any three secondary storage devices.

Answer»

The three secondary storage devices are Hard Disks, Magnetic Tapes and Floppy disks, Pen drivesetc.,

28.

Give any two word processor software.

Answer»

The two word processor software are MS word and Winword

29.

Mention the types of software.

Answer»

The system software, Application software, utility programs are the different types of software. 

30.

How do you initialize a string? Give an example.

Answer»

char name[50]=”bharath”; 

31.

What are the two basic types of inferences?(a) Reduction to propositional logic, Manipulate rules directly(b) Reduction to propositional logic, Apply modus ponen(c) Apply modus ponen, Manipulate rules directly(d) Convert every rule to Horn Clause, Reduction to propositional logic

Answer» Correct choice is (a) Reduction to propositional logic, Manipulate rules directly

Best explanation: None.
32.

Which among the following could the Existential instantiation of ∃x Crown(x) ^ OnHead(x, Johnny)?(a) Crown(John) ^ OnHead(John, Jonny)(b) Crown(y) ^ OnHead(y, y, x)(c) Crown(x) ^ OnHead(x, Jonny)(d) None of the mentioned

Answer» The correct option is (a) Crown(John) ^ OnHead(John, Jonny)

For explanation I would say: None.
33.

Write different types of programming constructs.

Answer»
  • Sequence of sequentially executed statements. 
  • Conditional execution of statements.
  • Iteration execution statements
34.

What is data type? Give an example.

Answer»

The set of values along with the operations that can be performed on these values are called data types.

Example: int 

35.

Mention any two advantages of the flowchart. 

Answer»

1.  It is a means of communication and easy to understand.

2.  Easy to convert into a program code.

36.

Write any two characteristics of OOPs.

Answer»

Data encapsulation and inheritance are the two important characteristics of OOP. 

37.

What are variables? Give its declaration syntax

Answer»

1. It is a location in the computer memory which can store data and is given a symbolic name for easy reference.

2. The declaration syntax is datatype variable name; 

38.

Briefly explain the working of switch statement with an example.

Answer»

Switch statement compares the value of an expression against a list of integers or character constants. The list of constants are listed using the “case” statement along with a “break” statement to end the execution.

#include<iostream.h>

int main(void)

{

int day;

cout<<"Enter the day of week between 1-7::";

cin>>day;

switch(day)

{

case 1:

cout <<"Monday";

break;

case 2:

cout <<"Tuesday";

break;

case 3:

cout <<"wednesday";

break;

case 4:

cout <<"Thursday";

break;

case 5:

cout <<"Friday";

break;

case 6:

cout <<"Saturday";

break;

case 7:

cout <<"Sunday";

break;

}

}

Result:

Enter the day of the week between 1 – 7 :: 7

Sunday

In the above Control Structure example the “switch” statement is used to find the day of the week from the integer input got from the user. The value present in the day is compared for equality with constants written in the word case.

Since no equality is achieved in the above example (from 1 to 6) as they’entered value is 7, default is selected and gives “Sunday” as a result.

39.

Explain any two character based functions.

Answer»

tolower(): It converts the capital alphabet character to lower case. For example, tolower(‘A’)

output: a

toupper ( ): It converts the lower case alphabet character to upper case.

For example, toupper(‘a’)

output: A

40.

Write a program to find the area and circumference of a circle.

Answer»

#include <iosteam.h>

#include<math.h>

#include<conio.h>

void main()

{

float R,area,circum,

clrscr();

cout<<"Enter the radius";

cin>>R;

area = 3.142*R*R;

circum = 2*3.142*R;

cout<<"Area = "<<area<<end1;

cout<<"Circumference = "<<circum<<end1;

getch();

}

41.

What are headers in footers in word processor?

Answer»

A header is a special area at the top of every page normally allocated in the top margin area. Footer is a special area at the bottom of every page normally allocated in the bottom margin area.

42.

We can use the SMART model to set goals. SMART stands for: a. Specific, Measurable, Achievable, Realistic, Time bound b. Secure, Measurable, Achievable, Realistic, Time bound c. Specific, Measurable, Acceptable, Realistic, Time bound d. Specific, Measurable, Acceptable, Remarkable, Time bound

Answer»

a. Specific, Measurable, Achievable, Realistic, Time bound

We can use the SMART model to set goals. SMART stands for Specific, Measurable, Achievable, Realistic, Time bound.

43.

The process of working together in a group is_______. a. Networking b. Building relationship c. Team work d. Understanding

Answer»

c. Team work

The process of working together in a group is Team work.

44.

What is an expression? Explain the types of expression.

Answer»

An expression is a combination of variables, constants and operators written according to the syntax of C++ language. In C++ every expression evaluates to a value i.e., every expression results in some value of a certain type that can be assigned to a

ExpressionTypes of operators usedDescription
Arithmetic
expressions
Arithmetic operatorsThese are used to perform mathematical calculations like addition,subtraction ,multiplication,division and modulus
Assignment operatorsThese are used to assign the values for the variables in C programs.
Relational expressionsRelational operatorsThese operators are used to compare the value of two variables.
Logical expressionLogical operatorsThese operators are used to perform logical operations on the given two variables.
Bit wise expressionsBit wise operatorsThese operators are used to perform bit operations on given two variables.
Ternary expressionsConditional(ternary)operatorsConditional operators return one value if condition is true and returns another value is condition is false.
Unary expressionsIncrement/decrement operatorsThese operators are used to either increase or decrease the value of the variable by one. 
Special operators&,*,sizeof() and ternary operators.
45.

Write an algorithm to find largest number in a input three numbers.

Answer»

Step 1: start.

Step 2: input a, b,c

Step 3: let Max=a .

Step 4: is b > Max? then

Max = b

Step 5: is c > max? then

Max = c

Step 6: print Max

Step 7: stop

46.

Radhika wants to display the following output:Store IdStore NameNo Of EmployeeS101Libas45S102Life Style68Choose the correct command:i. Select StoreId, Store Name, No Of Employee from STORE where StoreId=102 or StoreId=101; ii. Select StoreId, Store Name, No Of Employee from STORE where Store Name=”Libas” or Store Name=”Life Style”; iii. Select StoreId, Store Name, No Of Employee from STORE where Location=”Delhi” or Location=”Mumbai”; iv. Select StoreId, Store Name, No Of Employee from STORE where Store Name like ”L%”;Choose the correct option: a. (i) and (ii) are correct b. (i), (ii) and (iii) are correct c. (i), (ii) and (iv) are correct d. All are correct

Answer»

Correct option: c. (i), (ii) and (iv) are correct

47.

_________refers to focusing human efforts for maintaining a healthy body and mind capable of better withstanding stressful situationsa) Mental Healthb) Emotional Healthc) Self-Managementd) Stress Management

Answer»

(D) Stress Management

Stress Management refers to focusing human efforts for maintaining a healthy body and mind capable of better withstanding stressful situations.

48.

Subtract 28(10) from 14(10) using 2’s complement.

Answer»

14 – 28 = -14.

14(10) = 01110(2), 29(10) = 11100(2)

1’s complement of 11100 is 00011

2’s complement is 00011 + 1 = 00100

Now add, minuend with subtrahend, i.e.,01110 + 00100= 10010

Find the 1’s complement of 10010 is 01101 and

2’s complement of 01101 is 01101 + 1 = 1110(1).

49.

Represent – 83 in 1’s complement form.

Answer»

Divide the number 82 by 2 successively and write down the remainders from bottom to top 

+ 83=01010011 

To take 1 ‘s complement of a binary number change all 1 s to 0 and all 0’s to 1. 

Hence – 83 is 10101100

50.

Write the advantages of structured programming?

Answer»

1. Programs are easy to write because the programming logic is well organized.

2. Programs can be functionally divided into smaller logical working units (modularity).

3. Easy to maintain because of single entry and single exit.