Tech
Tech
COMPUTER FUNDAMENTALS
6.what is the binary equivalent of the number 368? a.111100000 b.111010000 c.101110000
d.110110000
Ans: c.101110000
8.which of the following combinations of the variables x,y,z makes the variable ‘a’ get the value 4
In the following expression?
A=(x>y)?((x>z)?x:z):( (y>z)?y:z)
a.x=3;y=4;z=2 b.x=6;y=5;z=3 c.x=5;y=4;y=5 d.x=6;y=3;z=5
Ans: a.x=3;y=4;z=2
14. ------------ helps in capturing the data and entering into computer system.
Ans: Input devices
19. Which of the OSI model is responsible for compression and decompression
a)presentation layer b)transport layer c)application layer d)session layer
Ans: presentation layer
20. Upon mixing two independent one-many relationships__________dependency arises.
a)transitive b)multivalued c)functional d)partial
Ans: Multivalued
21. If L is left node, M is middle node, R is right node then an L-M-R traversal can be termed
as_____
A) post order b) in order c) preorder d) this is invalid order
Ans: In order
If M-L-R then Preorder
If L-R-M then post order
22. which of the OSI model layer is also known as end-to-end layer
a) session layer b) presentation layer c) Transport layer d) Network layer
Ans: Transport Layer
23. Which of the OSI model layer is responsible for both encryption and decryption
a) Presentation layer b)Network layer c) session layer d) transport layer
Ans: Presentation Layer
24. Identify the point that is not true with respect to stack
a) not possible to insert or remove elements anywhere except the top of stack
b) Stack supports LIFO(last in first out) for deleting elements
c) None of these
d) stack is dynamic set where elements are removed in reverse order of insertion
Ans: Not Available please comment below the answer for others help, will be updated then.
25. When word flag a possible spelling or grammar error, it also changes mark on the spelling and
grammar status icon to _____________
a) red x b) red check mark c) green check mark d) green x
Ans: Red X
26. Identify the point that is NOT true with respect to a qeue?
a.deletion from the queue happens only at the tail of the queue.
b.Queue supports FIFO(First In First Out)order of removal of elements.
c.none of these
d.Insertion in queue happens only at the head of the queue.
Ans: Not Available please comment below the answer for others help, will be updated then.
28. Periodic collection of all the free memory space sto form contiguous block of free space by an
operating system is called:
a.garbage collection b.Dynamic memory allocation c.collison d.concatenation
Ans: Not Available please comment below the answer for others help, will be updated then.
32.The number of full and half adders required to add 16-bit numbers is:
a.16 half-adders,0 full-adders
b.8 half –adders,8 full-adders
c.4 half-adders,12 full-adders
d.1 half-adder,15 full-adders
Ans: d.1 half-adder,15 full-adders
Note:
The re-arrangement is to be done in-place i.e you cannot use another array.
Assumption:
You may assume that the array is of even length.
Example:
Input:
2 4 6 8 20 15 10 5
Output:
5 10 15 20 8 6 4 2
*********************************************************************************
Program
*********************************************************************************
1. PROBLEM STATEMENT:
You are given a function,
int FindSecondLargestNumber(int a,int b,int c);
The function takes three integers 'a', 'b','c' as input .Implement the function to find and
return the second largest number.
CODING:
int FindSeconLargestNumber(int a,int b,int c);
{
/*write your code here .*/
********************
PROGRAM
*******************
Find sum leaving our row and col: cocubes coding question
PROBLEM STATEMENT:
You are given a function,
int FindSumLeavingOutRowCol(int** arr, int m, int n, int i,int j);
The function takes a two-dimensional array 'arr', its number of rows 'm', its number of
columns 'n' and integers 'i' and 'j' as input. Implement the function to find and return
the sum of elements of the array leaving out the elements of the i and j column. The
algorithm to find the sum is as follows:
1.Iterate over every row except for i row,and keep on adding each element except for
the elements of j column to a variable 'sum'.
NOTE:
1.Row and column indices start from 0.
2. Value of i and j from 1.
CODING:
int FindSumLeavingOutRowCol(int** arr, int m, int n,int j);
{
/* write your code here */