Академический Документы
Профессиональный Документы
Культура Документы
4. WAP read a line from file from location N1 to N2 using command line arguments
Eg:exe 10 20 a.c
5. WAP find the largest of 4 no using macros.
General section
Computer science general, c/c++ section, Java section ,The question paper had 48 questions to
be answered in 1hr. Time will be quite sufficient. They have different sets of question papers. .
1 General section : computer science general knowledge
2. Computer science general: simple questions
3. An application program that is used by the users to get the information from the backend of
some application like databases:
a) application server b) proxy server c) database server d) option Ans: database server
5. Some question regarding the company and who developed it ( the thing to remember is that
Apple produce Macintosh computers).
c/c++ section: questions on c/c++, programs o/p etc.
1 main( )
{
unsigned int i=3;
while( i >=0)
printf( "%d", i--);
}
how many times will the printf stmt be executed?
a)0 b)3 c)4 d)infinite
Ans: I think the answer is infinite, b'cos 'i' is an unsigned integer and it will not decrement
below '0' and hence end up in an infinite loop.(yes, i checked and it is getting stuck in an infinite
loop)
2. main( )
{
int x,y, z;
x=2;
y=5;
z= x+++y;
printf("%d %d %d", x, y z);
}
a)3 5 7 b) option 2 c) option 3 d) option 4
Ans: a
Aptitude
Ans- 20.5.
2. A train 100 metres long takes 6 seconds to cross a man walking at 5 kmph in
the direction opposite to that of the train. Find the speed of the train.?
Ans-55 kmph
3. In a game of 80 points; A can give B 5 points and C 15 points. Then how many points B can
give C in a game of 60 ?
Ans-8 points
4. A and B can do a piece of work in 18 days; Band C can do it in 24 days A and C can do it in 36
days. In how many days will A, Band C finish it together and separately?
Ans-144 days
5. The ratio between a two-digit number and the sum of the digits of that
number is 4 : 1.If the digit in the unit's place is 3 more than the digit in the ten’s place, what is
the number?
Ans-36.
Ans-7/18
8. If the a radio is sold for rs 490 and sold for rs 465.50.find loss%.
Ans-5%
Question (9-10) Choose the word that best completes the analogy.
A. Pier
B. Berth
C. Depot
D. Station
A. Power
B. Weight
C. Strength
D. Thickness
11. In the question below, there is a sentence of which some parts have been jumbled up.
Rearrange these parts which are labelled P, Q, R and S to produce the correct sentence. Choose
the proper sequence.
A. QRPS
B. SQPR
C. SQRP
D. QPSR
Ans-D
12. Choose the word which best expresses the meaning of the given word.
CANTANKEROUS
A. Quarrelsome
B. Rash
C. Disrespectful
D. Noisy
Ans-A
13. choose the word which is the exact OPPOSITE of the given words.
MORTAL
A. Divine
B. Immortal
C. Spiritual
D. Eternal
Ans-B
14. Each question consist of two words which have a certain relationship to each other followed
by four pairs of related words, Select the pair which has the same relationship.
SYMPHONY:COMPOSER
A. Leonardo:music
B. Fresco:painter
C. colours:pallet
D. art:appreciation
Ans-B
15. question has an underlined word followed by four answer choices. You will choose the word
that is a necessary part of the underlined word.
language
A. tongue
B. slang
C. writing
D. words
Ans-D
16. Fill the blank in the middle of the series or end of the series.
A. GRR
B. GSS
C. ISS
D. ITT
Ans-C
17. Find the statement that must be true according to the given information.
Vincent has a paper route. Each morning, he delivers 37 newspapers to customers in his
neighborhood. It takes Vincent 50 minutes to deliver all the papers. If Vincent is sick or has
other plans, his friend Thomas, who lives on the same street, will sometimes deliver the papers
for him.
Ans-A
18. The question presents a situation and asks you to make a judgment regarding that
particular circumstance. Choose an answer based on given information.
Mrs. Carson took a taxi to meet her three friends for lunch. They were waiting for her outside
the restaurant when she pulled up in the car. She was so excited to see her friends that she left
her tote bag in the taxi. As the taxi pulled away, she and her friends took notice of the license
plate number so they would be able to identify the car when they called the taxi company.
#1: The four women seem to agree that the plate starts out with the letter J.
#2: Three of them agree that the plate ends with 12L.
#3: Three of them think that the second letter is X, and a different three think that the third
letter is K.
The four license plate numbers below represent what each of the four women thinks she saw.
Which one is most likely the license plate number of the taxi?
A. JXK 12L
B. JYK 12L
C. JXK 12I
D. JXX 12L
Ans-A
A. deeryclostagnos
B. agnosdelano
C. agnosvitriblunin
D. trymuttiagnos
Ans-C
A. poenmigen
B. cuopeisel
C. lasandansa
D. poenforc
Ans-D
Questions on C
1. Find the output of the program
.main()
a=5;
if(a=1)}
printf(“d”,a);
c)For loops
Ans-a,c
)#include
main()
int a=6,y=3,z;
float t=4.55;
z=a/y+t+a/y-t+a-2*t;
printf("%d",z);
}
a. 3
b. 3.00000
c. 3.55
d.none
Ans: D
).#include
main()
int x;
float g;
g=int x
printf("-------------");
Main ()
{
Static char a[3][4]={"abcd","mnop" ,"fghi"}
Putchar(**a);
b)prints a
c)prints m
d)prints garbage
Ans: b
main()
Int i=100;
Int M();
Printf("%d",(*M)(i));
Int M(x)
Int x;
Printf("%d",++x);
a)prints 100
b)prints 101
c)prints error
d)prints 1013
main()
Int i=7
If(0==fork())
I+=10;
Else
Wait(0);
Printf("%d",i);
c)The child can start executing only after the termination of the parent process.
int x=20,y=35;
x=y++ + x++;
y= ++y + ++x;
printf(“%d%dn”,x,y);
Answer : 5794
int x;
int modifyvalue()
return(x+=10);
int changevalue(int x)
return(x+=1);
}
void main()
int x=10;
x++;
changevalue(x);
x++;
modifyvalue();
printf("First output:%dn",x);
x++;
changevalue(x);
printf("Second output:%dn",x);
modifyvalue();
printf("Third output:%dn",x);
Answer: 12 , 13 , 13
// some code
A. Defining
B. Declaring
C. Prototyping
D. Calling
Ans-B
A. 3.4E-4932 to 1.1E+4932
B. 3.4E-4932 to 3.4E+4932
C. 1.1E-4932 to 1.1E+4932
D. 1.7E-4932 to 1.7E+4932
Ans-A
13. How many bytes are occupied by near, far and huge pointers (DOS)?
A. near=2 far=4 huge=4
Ans-A
14. In mathematics and computer programming, which is the correct order of mathematical
operators ?
Ans-B
1. !
2. sizeof
3. ~
4.&&
A 1, 2
B. 1, 3
C. 2, 4
D. 1, 2, 3
Ans-D
#include<stdio.h>
A. During editing
B. During linking
C. During execution
D. During preprocessing
Ans-D
int (*ptr)[10];
Ans-B
18. Which of the following operations can be performed on the file "NOTES.TXT" using the
below code?
FILE *fp;
fp = fopen("NOTES.TXT", "r+");
A. Reading
B. Writing
C. Appending
Ans-D
A. printf("\n");
B. echo "\n";
C. printf('\n');
D. printf("\n");
Ans-D
20. Which of the following function is used to find the first occurrence of a given string in
another string?
A. strchr()
B. strrchr()
C. strstr()
D. strnset()
Ans-C
Questions on Computer
1. What is the cause of thrashing? How does the system detect thrashing? Once it detects
thrashing, what can the system do to eliminate this problem? –
2. What is DRAM?
4. While running DOS on a PC, which command would be used to duplicate the entire diskette?
Ans- Diskcopy
6. What is Marshalling?
A. mouse
B. printer
C. terminals
D. disk
Ans-D
9. The problem of thrashing is affected significantly by:
A. program structure
B. program size
C. primary-storage size
Ans-A
10. Advantage(s) of using assembly language rather than machine language is (are):
Ans-D
11. When a computer is first turned on or restarted, a special type of absolute loader is
executed, called a
B. Boot loader
C. Bootstrap loader
D. Relating loader
E. None of the above
Ans-C
12. Which, of the following checks, cannot be carried out on the input data to a system?
A. consistency check
B. Syntax check
C. Range check
Ans-B
Ans-C
Ans-B
15. A form of code that uses more than one process and processor, possibly of different type,
and that may on occasions have more than one process or processor active at the same time, is
known as
A. multiprogramming
B. multi threading
C. broadcasting
D. time sharing
Ans-B
16. Which command is used to copy all files having the string chap and any two characters after
that to the progs directory?
A. cp chap?? progs
B. cp chap* progs
C. cp chap[12] /progs/*.*
D. cp chap?? /progs/*
Ans-A
17. Which of the following special shell variables is used to process number of the last
background job?
A. $!
B. $#
C. $0
D. $*
Ans-A
18. Which of the following command addresses all users who are currently hooked on?
A. write
B. mail
C. wall
D. mesg
Ans-C
19. Which of the following command addresses all users who are currently hooked on?
A. write
B. mail
C. wall
D. mesg
Ans-C
20. The filed separator in cut command is specified with
A. -a option
B. -d option
C. -r option
D. -x option
Ans-B
A. NULL.
B. NOT NULL.
C. Either of the above can be used.
Ans-B
27. A station in a network forwards incoming packets by placing them on its shortest output
queue. What routing algorithm is being used?
B. flooding
C. static routing
D. delta routing
ANS-A
28. Frames from one LAN can be transmitted to another LAN via the device
A. Router
B. Bridge
C. Repeater
D. Modem
Ans-B
29. Which of the following condition is used to transmit two packets over a medium at the
same time?
A. Contention
B. Collision
C. Synchronous
D. Asynchronous
Ans-B
B. a technique used by protocols in which a lower level protocol accepts a message from a
higher level protocol and places it in the data portion of the low level frame
C. One of the pieces that results when an IP gateway divides an IP datagram into smaller
pieces for transmission across a network that cannot handle the original datagram size.
Ans-A
A. x
B. y
C. a
D. z
Ans-A
B. no thrown objects
C. any thrown object that has not been caught by an earlier catch block
D. all thrown objects that have been caught by an earlier catch block
Ans-C
Ans-A
A. must be T
B. can be T
C. cannot be T for functions you create, but may be for C++'s built-in functions
D. cannot be T
Ans-B
A. character literal
B. named literal
C. numeric literal
D. string literal
Ans-C
36. Which of the following declares and initializes an Integer variable named numltems?
A. int numltems = 0;
C. integer numltems = 0;
D. numltems int = 0;
E. numltems integer = 0;
Ans-A
37.Which of the following tells C++ to display numbers with two decimal places?
A. setdecimal(2)
B. setiosflags(2)
C. setiosflags(2.00)
D. setprecision(2)
Ans-D
B. constructor functions
C. void functions
D. overloaded + operators
Ans-B
39.In the expression p --> val,p is a(n)
A. address
B. pointer
C. structure
D. header
Ans-B
A. you save many lines of code by not rewriting an identical structure definition in each
function that uses it
C. it is required in C++
Ans-A