Filter
Oil India Limited Placement Papers Ramco Placement Papers Rockwell Placement Papers3i Placement PapersABB Placement PapersAccel Frontline Placement PapersAccenture Placement PapersAcumen Software Placement PapersAditi Placement PapersAdobe Placement PapersADP Placement PapersAgile Placement PapersAgreeya Placement PapersAIG Placement PapersAkamai Placement PapersAks Software Systems Placement PapersAlcatel Placement PapersAllahabad Placement PapersAlle Placement PapersALLFON Placement PapersAlter Placement PapersAlumnus Placement PapersAmdocs Placement PapersAMI Placement PapersAndhra Bank Placement PapersANZ Placement PapersAppLabs Placement PapersAricent Placement PapersASDC Placement PapersAshok Placement PapersAshok LeyLand Placement PapersAspire Placement PapersASPNET Placement PapersAST Pvt Ltd Placement PapersAsto Placement PapersAtlas Placement PapersAxentis Soft Placement PapersAxes Placement PapersAztec Placement PapersBAAN Placement PapersBajaj Placement PapersBank Of Maharashtra Placement PapersBARC Placement PapersBEL Placement PapersBEML Placement PapersBently Placement PapersBFL Placement PapersBHEL Placement PapersBirlasoft Placement PapersBlueStar Placement PapersBOB Placement PapersBOSCH Placement PapersBPL Placement PapersBrakes Placement PapersBSNL Placement PapersC-DOT Placement PapersCadence Placement PapersCalsoft Placement PapersCampaq Placement PapersCanarys Placement PapersCapgemini Placement PapersCaritor Placement PapersCarrizalsoft Technologies Placement PapersCarrizalsoft Technologies Pvt Ltd Placement PapersCaterpillar Placement PapersCD Placement PapersCDAC Placement PapersCelstream Placement PapersCGI Placement PapersChangepond Placement PapersChatargee Placement PapersCisco Placement PapersCiticorp Placement PapersCMC Placement PapersCOGNIZENT Placement PapersComputer Placement PapersConsagous Placement PapersConsagous Technologies Placement PapersConvergys Placement PapersCORDYS Placement PapersCOSL Placement PapersCovansys Placement PapersCrompton Placement PapersCSC Placement PapersCTS Placement PapersDaimler Placement PapersDell Placement PapersDeloitte Placement PapersDelphi-tvs Placement PapersDeutsche Placement PapersDharma Placement PapersDigital Placement PapersdMtechnologies Placement PapersDot Placement PapersDot Com Infoway Placement PapersDRDO Placement PapersDSL Placement PapersDSQ Placement PapersDSRC Placement PapersE2E Placement PapersEasyTech Placement PapersEDS Placement PapersEFFIGENT Placement Papersefunds Placement PapersEIL Placement PapersELGI Placement PapersELICO Placement PapersEnercon Placement PapersEpson Placement PapersEricssion Placement PapersEssar Placement PapersFCG Placement PapersFidelity Placement PapersFlextronics Placement PapersForbes Placement PapersFORCE Placement PapersFuture Placement PapersFX Placement PapersFX Labs Placement PapersG2One Network Private Limited Placement PapersGDA Placement PapersGE Placement PapersGenpact Placement PapersGeodesic Placement PapersGeometric Placement PapersGlobal Placement PapersGodrej Placement PapersGoogle Placement PapersGrapcity Placement PapersGSSL Placement PapersHAL Placement PapersHCL Placement PapersHCL Technologies Placement PapersHello Placement PapersHexaware Placement PapersHFCL Placement PapersHindustan Placement PapersHo Placement PapersHoneywell Placement PapersHorizon Placement PapersHP Placement PapersHPCL Placement PapersHSBC Placement PapersHuawei Placement PapersHughes Placement PapersI-Flex Placement PapersI-Gate Placement Papersi2 Placement PapersIBM Placement PapersIBPS Placement PapersIBS Placement PapersICICI PO DRIVE Placement PapersIDBI Placement PapersIikanos Placement PapersIindus Placement PapersIkosindia Placement PapersImpetus Placement Papersinautix Placement PapersIndian Overseas Bank Placement PapersIndusTeqsite Placement PapersInfineon Placement PapersInformatica Placement PapersInfosys Placement Papersinfotech Placement PapersInphlox Placement PapersIntec Placement PapersIntegra Placement PapersIntegraphr Placement PapersInterwoven Placement PapersIntex Placement PapersIOCL Placement PapersIonnor Solutions Placement PapersiSoft Placement PapersIspat Placement PapersISRO Placement PapersIttiam Placement PapersIvega Placement PapersJ&B Placement PapersJataayu Placement PapersJean Placement PapersJean Martin Placement PapersJet Placement PapersJEYPEE Placement PapersJindal Placement PapersJKT Placement PapersJOHN Placement PapersKalam Software Technology Placement PapersKanbay Placement PapersKeane Placement PapersKenexa Placement PapersKkshema Placement PapersKleward Placement PapersKnoah Solutions Placement PapersKPIT Placement PapersKPIT Cummins Placement PapersL&T Placement PapersL&T Infotech Placement PapersL&T(EEC) Placement PapersLCube Placement PapersLG Placement PapersLG Soft India Placement PapersLifetree Placement PapersLinkwell Placement PapersLionBridge Placement PapersLogica Placement PapersLucent Placement PapersM-Phasis Placement PapersMA Placement PapersMANGANESE Placement PapersMascot Placement PapersMastek Placement PapersMatrix Placement PapersMAXSOFT Placement PapersMcAfee Placement PapersMECON Placement PapersMentor Placement PapersMerrill Placement PapersMicrosoft Placement PapersMindfire Solutions Placement PapersMindtree Placement PapersMiraclesoft Placement PapersMistral Placement PapersMotorola Placement PapersMTNL Placement PapersNagarro Placement PapersNalko Placement PapersNCR Placement PapersNess Placement PapersNest Placement PapersNewgen Placement PapersNFL Placement PapersNHPC Placement PapersNihilent Placement PapersNIIT Placement PapersNovartis Placement PapersNovell Placement PapersNTPC Placement PapersNucleus Placement PapersNYROS TECHNOLOGY Placement PapersOil Placement PapersONGC Placement PapersOnline Education Placement PapersOnMobile Placement PapersOracle Placement PapersOrange Placement PapersParagon Placement PapersPCS Placement PapersPDIL Placement PapersPentaware Placement PapersPentaware Tech Placement PapersPerot Placement PapersPersistent Placement PapersPhilips Placement PapersPlanetasia Placement PapersPNESTEC Placement PapersPolaris Placement PapersPoor Placement PapersPramati Placement PapersProdEx Placement PapersPSI Placement PapersQuark Placement PapersQuinnox Placement PapersQwest Placement PapersR Placement PapersRamco Placement PapersRapidigm Placement PapersRBI Placement PapersRedpine Placement PapersReliance Placement PapersReliance(RIL) Placement PapersRinl Placement PapersRipples Infolink Placement PapersRobert Placement PapersRobert Bosch Placement PapersRockwell Placement PapersRRB(Railway Placement PapersRRB(Railway Recruitment Board ) Placement PapersRSsoftware Placement PapersSahi Placement PapersSail Placement PapersSamsung Placement PapersSamtel Placement PapersSAP Placement PapersSapient Placement PapersSasken Placement PapersSatyam Placement PapersSBI Placement PapersScandent Placement PapersSchneider Placement PapersSCT Placement PapersSemanticSpace Placement PapersShriram Placement PapersSIEMENS Placement PapersSierra Placement PapersSkyTECH Placement PapersSLK Software Placement Paperssobha Placement PapersSoftSol Placement PapersSonata Placement PapersSony India Placement PapersSQL Placement PapersSQL Star Placement PapersSSC Placement PapersStarent Placement PapersStarent Networks Placement PapersSTMicroelectronics Placement PapersSubex Placement PapersSUN Placement PapersSuther Placement PapersSynergy Placement PapersSynopsys Placement PapersSyntel Placement PapersSystech Solutions Placement PapersTalisma Placement PapersTata Placement PapersTata Technologies Placement PapersTavant Placement PapersTCE Placement PapersTCS Placement PapersTech Placement PapersTech Mahindra Placement PapersTELCO Placement PapersTelserra Placement PapersTEMNOS Placement PapersTesco Placement PapersTexas Placement PapersThermax Placement PapersThink Placement PapersTHOROGOOD Placement PapersThoughtWorks Placement PapersTIL Placement PapersTISL Placement Paperstorry Placement PapersTriad Placement PapersTriam Placement PapersTrianz Placement PapersTrilogy Placement PapersTSPL Placement PapersTVS Placement PapersUbiNetics Placement PapersUnited Placement PapersUnited Health Group Placement PapersUS Placement PapersValueLabs Placement PapersValueOne Placement PapersVariFone Placement PapersVedanta Placement PapersVerchaska Placement PapersVERITAS Placement PapersVerizon Placement PapersVernalis Placement PapersVirtusa Placement PapersVisual Placement PapersVIT Placement PapersVizag Steel Plant Placement PapersVizual Placement PapersVSNL Placement PapersVsworx Placement PapersWBPDCL Placement PapersWepIndia Placement PapersWilco Placement PapersWipro Placement PapersXansa Placement PapersXcino Placement PapersYahoo Placement PapersYantro Placement PapersYASH Placement PapersZenith Placement PapersZenser Placement PapersZTE Placement Papers

Download quark Placement Papers in MS Word and PDF Format for Job Interview

Quark Placement Paper : Aptitude - General

QUANTITATIVE APTITUDE
Directions for question nos. 1-2: Eighty Five children went to amusement park where they could ride on merry –go-round roller coaster and Ferris wheel .It was known that 20 of them have took all three rides and 55 of them have taken at least two of the three rides. Each ride cost Rs.1 and the total receipt of the amusement park was Rs.145.

1) How many children did not try any of the rides. ?
A) 5 B) 10 C) 15 D) 20
Ans. 15.
20 kids * 3 rides = Rs. 60
(55-20=)35 kids * 2 rides = Rs. 70
60 + 70 = Rs. 130
So, Rs. (145 – 130 = ) 15 are left for the other (85 – 55 = ) 30 kids . so only 15 of them can take a ride and rest 15 will be left out.
145 rides were taken. 20 of them took all three, i.e. Rs. 60 were spent, so 145-60= Rs. 85 are left for the others. Total kids were 85, so rest were 65. out of these 65,

2) How many children took exactly one ride?
A) 5 B) 10 C) 15 D) 20
Ans. 15

3) Four cities are connected by a road network as shown in the figure. In how many ways can you start from any city and come back to it without travelling on the same road more than once ?
A) 8
B) 12
C) 16
D) 20
Ans. 12.
Consider the top city, the following are the 3 routes possible, starting from the leftmost edge. Since there are 3 edges emanating from each city and the figure is perfectly symmetrical, these 3 routes are possible from each edge, hence for any given city, the total number of routes = 4 * 3 = 12.

Directions for question nos 4-5:
A, B, and C are three numbers, Let
@(A, B)= Average of A and B
*(A, B)=Product of A and B
/(A, B)=A divided by B

4) If A=2 and B=4 the value of @( / (*(A,B),B),A) would be
A) 2
B) 4
C) 6
D) 16
Ans. 2

5) Sum of A and B is given by
A) *(@(A, B), 2)
B) /(@(A,B),2)
C) @(*(A,B),2)
D) @(/(A,B),2
Ans. A.

6) Let x<0, 01 which of the following is false:
A) (x2-z2)has to be positive.
B) yz can be less than one.
C) xy can never be zero
D) (y2-z2) is always negative
Ans. A.

7) If A’s income is 25% less than B’s ,by what % is B’s income greater than that of A ?
A) 35%
B) 25%
C) 30%
D) None of these
Ans. D.
Directions for question nos 8-12: A professor keeps data on students tabulated by the sex and the performance of the student. Data is kept in a computer disk, but unfortunately some of it is lost because of a virus. Only the following could be recovered:
Performance Total
Average Good Excellent
Male 10
Female 32
Total 30

Panic buttons were pressed but to no avail. An expert committee was formed,which decided that the following facts were self evident:
a) Half the students were either good or excellent.
b) 40% of the students were female
c) One third of male students were average

8) How many students were both female and excellent?
A) 0
B) 8
C) 16
D) 32
Ans. A

Performance Total
Average Good Excellent
Male 10 48
Female 32
Total 30 80

Panic buttons were pressed but to no avail. An expert committee was formed,which decided that the following facts were self evident:
d) Half the students were either good or excellent. (implies the total of good and excellent is 40, i.e., hall of 80)
e) 40% of the students were female (this implies that 32 is 40% of the total students, hence total students are 80, this implies that males are 48, calculate the rest yourself)
f) One third of male students were average

9) What proportion of good students are male?
A) 0
B) 0.73
C) 0.4
D) 1.0
Ans. B.

10) What proportion of female students are good?
A) 0
B) 0.25
C) 0.50
D) 1.0
Ans. B

11) How many students are both male and good?
A) 10
B) 16
C) 22
D) 48
Ans. C

12) Among average students, what is the ratio of male to female?
A) 1:2
B) 2:1
C) 3:2
D) 2:3
Ans. D

ANALYTICAL

Directions for Questions Nos: 13 to 17
Five executives of a multinational company met in Bombay:
Mr. Ram can speak Tamil and Hindi
Mr.Sham speaks Tamil and English
Mr. Raju converses in English and Hindi
Mr.Balu speaks Telugu and Tamil quite well.
Mr.Lalu can speak Hindi and Telugu

13) Which of the following can act as a interpreter when Mr.Raju and Mr.Balu wish to confer?
A) Mr.Ram Only
B) Mr.Sham Only.
C) Either Mr.Ram or Mr.Sham
D) Any of the other three executives.
Ans. D
14) Besides Mr. Lalu, which of the following can converse with Mr.Balu without an Interpreter?
A) Mr.Ram Only
B) Mr.Sham only
C) Mr.Ram and Mr.Sham
D) Mr.Raju Only
Ans. C

15) Which of the following cannot converse without interpreter?
A) Mr. Sham and Mr.Lalu.
B) Mr. Ram and Mr. Sham
C) Mr. Ram and Mr. Raju
D) Mr. Sham and Mr. Balu
Ans. A
16) If a sixth executive is brought in, for him to be understood by the maximum number of original five, he should be fluent in?
A) English and Telugu
B) Hindi and Tamil
C) Telugu and Hindi
D) Hindi and English
Ans. B
17) Of the languages spoken the most common languages are
A) English and Tamil
B) English and Hindi
C) English and Telugu
D) Hindi and Tamil
Ans. D
Directions for Questions Nos:18 to 21
Four people of different nationalities live on the same side of a street in four houses each of different color. Each person has a different favorite drink. The following additional information also known:
The Englishman lives in the red house.
The Italian drinks tea.
The Norwegian lives in the first house on the left.
In the second house from the right they drink milk
The Norwegian lives adjacent to the blue house
The Spaniard drinks fruit juice
Tea is drunk in the blue house.
The White House is to the right of the red house
18) Milk is drunk by
A) Norwegian
B) Englishman
C) Italian
D) None of these
Ans. B

19) The Norwegian drinks
A) Milk
B) Cocoa
C) Tea
D) Fruit Juice
Ans. B

20) The color of Norwegian’s house is
A) Yellow
B) White
C) Blue
D) Red
Ans. A

21) Which of the following is not true:
A) Milk is drunk in the red house
B) Italian lives in the blue house
C) The Spaniard lives in a corner house
D) The Italian lives next to Spaniard.
Ans. D
Directions for Questions Nos: 22 to 23
Kya-Kya is an island in the south pacific .The inhabitants of Kya-Kya always answer any question with two sentences, one of which is always true and other is always false.
22) You are walking on a road and come to a fork. You ask the inhabitants Ram, Laxman, Lila,”Which road will take me to the village?”
Ram says,”I never speak to strangers. I am new to this place”
Laxman says,”I am married to Lila. Take the left road”.
Lila says,”I am married to ram. He is not new to this place”
Which of the following is true?
A) Left road takes you to the village
B) Right road takes you to the village
C) Lila is married to laxman
D) None of above
Ans. A.

Ram said he never talked to strangers, but he spoke to a stranger, this means that this statement is false, hence his other statement must be true, hence the second statement of Lila is false, hence her first statement is true that is she is married to ram, hence the first statement of Laxman is false, hence his second statement is true, that is take the left road.

23) You find that your boat is stolen.You question three inhabitants of the island and they reply as follows:
John says,”I didn’t do it. Mathew didn’t do it”
Matthew says,”I didn’t do it. Krishna didn’t do it.”
Krishna says,”I didn’t do it .I don’t know who did it.”
Who stole your boat?
A) John
B) Matthew
C) Krishna
D) None of them.
Ans. B
Matthew said he didn’t know who did it, but he also said he didn’t do it, which means he knows who did it, which means his second statement is false, which means his first statement is true…
Directions for question nos 24-25: There are five trains A, B, C, D and E that run between the following stations:
Bombay and Pune
Calcutta and Bombay
Pune and Goa
Goa and Bombay
Pune and Calcutta
Trains A and D do not go to Bombay, B&C do not go to Calcutta and C & D do not touch Goa.

24) Train E goes from………… to………… and vice-versa

A.Pune and Calcutta
B.Bombay to Goa
C.Bombay to Calcutta
D.Goa to Pune.
Ans. C

25) Which train runs between Calcutta and Pune?
A) A
B) B
C) C
D) D
Ans. D

COMPUTER AWARENESS

26) The device that can transform digital data into analog data is called a
a)transformer
b)network
c)carrier
d)modem
Ans. d

27) Following is true about the IP of a machine
a) It is 48-bit and will always be unique around the world.
b) It is 48-bit and is not necessarily be unique around the world.
c) It is 32-bit and will always be unique around the world.
d) It is 32-bit and is not necessarily be unique around the world.
Ans. c

28) A machine having 64MB memory runs a executable which is 300MB on disk. This is achieved by:
a) Use of FAR pointers
b) Page swapping.
c) Save some variables on another machine on network.
d.) Cannot be run on the machine.
Ans. b

29) Which of the following is true about thread and process startup speed:
a.) The startup of a thread is faster than a process.
b.) The process startup is faster as it is directly controlled by the OS.
c.) They will be equal.
d.) Depends on OS that is used. Faster on Windows98 slower on NT.
Ans. a

30) What causes "Thrashing" of a program :
a.) The constant swapping of program due to page faults.
b.) The inability of a program to get assess to a network resource.
c.) A near overflow / underflow of a variable.
d.) Assessing a memory area not allocated to the process.
Ans. a

31) Turbo-C is a / an
a.) IDE and C compiler/linker.
b) C-compiler/linker
c) C .
d) code generator.
Ans. a

32) The path of creation of an executable is :
a.) coding, linking, compiling, parsing.
b.) coding, parsing, compiling, linking.
c.) coding, compiling, parsing, linking.
d.) coding, compiling, linking, parsing.
Ans. b

33) Memory leak in software is due to
a.) Heavy recursion used in logic.
b.) Using structures of large size
c.) Improper use of the CPU registers.
d.) Improper release of allocated memory .
Ans. d

34) A "stable sort" is different from "sort" in the following way
a) Stable sort handles multiple thread access.
b.) Stable sort maintains the order of equal entities as it was in original sequence.
c.) Stable sort will always sort using the fastest scheme available in the library.
d.) Stable sort can handle exceptional conditions like interrupts in software.
Ans. b

35) The classic way of checking whether a mathematical expression has matched paranthesis will employ the following data structure :
a.) List.
b.) Directed Graph
c.) Threaded Binary tree.
d.) Stack.
Ans. d

36) The fastest sorting algorithm for a Random set of numbers is:
a.) Quick sort
b.) Shell sort
c.) Bubble sort
d.) Double Bubble sort.
Ans. a or b, I don’t know

37) Which of these items is not a form of IPC:
a.) Shared Memory
b.) Pipes.
c.) Message queues.
d.) Semaphores
Ans. b

38) The term "socket" in software refers to:
a.) The software primitive which allows access to the hardware attached to the computer.
b.) The API exposed by drivers to assess a hardware.
c.) End point of connection used to transfer data programmatically.
d.) Th primitive used by OS to get assess to the CPU for process scheduling.
Ans. c

39) Which of these statements is True:
a.) XML is a sub-set of HTML.
b.) XML is a less generic markup language standard derived from SGML.
c.) XML is HTML for Xtended Interfaces like mobile-phones.
d.) XML is a Xtension of HTML which defines new tags.
Ans. d

40) DCOM and CORBA are:
a.) Specifications which enable faster downloads on the net.
b.) Specifications that allow objects to be accessed in a location independent manner.
c.) Parallel implementations of XML by Microsoft and Sun respectively..
d.) Specifications to store objects on disk, for later retrieval.
Ans. b

41) The Process that involves monitoring and improving the software product development is:
(a) Quality Assurance
(b) Quality Control
(c) Quality Improvement
(d) None of the above
Ans.

42) An executable test that verifies a functionality of the software unit with given input and expected output is called:
(a) Test Script
(b) Test Plan
(c) Test Case
(d) All of the above
Ans. maybe c

43) A Bug in the software is, when there is
(a) Application Crash
(b) Feature Failure
(c) Loss of Data
(d) All of the above
Ans. maybe a, or probably d

44) Testing based on External Specifications without knowledge of how the system is constructed:
(a) Black Box Testing
(b) White Box Testing
(c) Stress Testing
(d) Performance Testing
(e) None of the above
Ans. a

45) Which of the following is false
(a) QA is a process defined to attain Quality Standards
(b) QC is testing of the product during its production workflow
(c) A Test case could contain many Test Plans.
(d) A Test Plan could contain many Test Script & Test Cases
Ans. c

46) A Printing Machine that transfers impressions from Flat Plate to Rubber Cylinder, thence to paper is called
(a) Laser Printer
(b) Press, Offset
(c) Digital Printer
(d) All of the above
Ans. maybe Offset

47) Printing process in which ink is applied to paper or board from raised portions of printing plates or type is called:
(a) Printing, Letterpress
(b) Printing, Flexographic
(c) Printing, Silk screen
(d) None of the above
Ans. maybe letterpress

48) Yellow (lemon), Magenta (cold red), Cyan (blue-green) are the three
(a) Process Colors
(b) Monitor Colors
(c) Special Colors
(d) Spot Colors
Ans.

49) Leading specifies:
(a) The space between the lines in a paragraph.
(b) The space between the base of a line to the base of the following line in a paragraph.
(c) The space between the top of the X height and the bottom of the X height of the following line in a paragraph
(d) The space between the beard of the top line and the beard of the bottom-line.
Ans.

50) Which is a typical page layout program out of the following software products:
(a) Adobe Photoshop
(b) Adobe PageMaker
(c) Macromedia FreeHand
(d) Macromedia Director

Quark Placement Paper : Whole Testpaper

QUARK Placement Sample Question Paper

There was an online written test

50 questions = 10 comp. awareness, 10 mathematical (easy), 10 verbal reasoning(difficult, lenghty, you are advised to attempt them at last only ), 20 c++ or c or Java whichever u opt.
then three interviews, (2 technical, one hr) are taken.
quarks people stress on c++, os, dbms, SE(testing, sdlc etc.) in the interview.

here are some questions that i can recall from the written test.

one question of c++

main()
{
int x=10,y=20,z=5;
x=x cout < }
ans 1


here quarks was on 12-8-03 and
recruit 2 mca,s and 12
be,s.

first you should opt test in c++,
because they have
only requirements in c++.
they will ask questions on virtual
functions,
destructures etc.

there are 50 questions and time is
60 mins.
1-10 analytical reasoning
11-20 quant
21-30 computer awearness
31-50 c++

c & c++ questions are diffirent in
quant and in comp
awearness.
the analytical reasoning will take
time so u should do
this at last i.e. by seeing the
length of question.

quant was easy

1. 165^2-164^2
a 329 ans
b 325

2. there is one question onloan
from father of 240
rupees the answer of that question
is 21.

3. all other question in this
section was easy.


computer awearness

1. Leading is....
options includes from msWord

2. which of the following is not
language
a. Pascal
b. pl/1
c. findles ans
d. j


3. one question on IPC(inter
process comm)

4. which of the following stores
highest amt of data.

a. floppy
b. cd
c. book
d. none of above

5. all other questions were from os



C++

1. can there be a static class


2. dynamic binding is
options


3 o/p of following prog

main()
{
int i,j=9999;
char buff[5];
i=sprintf(buff,"%d",j);

cout< }

a. 9999, 4
b 9999,5 ans
c 4,9999
d 9999,1



4. class ab{};
main()
{
cout< }

a 1
b 0 ans
c 2
d 4


5.

class ab
{
int i;
public:
virtual void fun(){}
}
main()
{
cout< }

a. 4 ans




6. when new fails it
a. send _set_new_handler
b. send excection
c.
d. both a and b



7. #define f(a,b) a+b
#define g(x,y) x*y
main()
{
int i;
i=f(4,g(5,6));
cout< }

a. 34 ans


8 #define x(a) ++a + a++ +a++
like this I do not
remember this question ans was 4.


9. polymorohism is

10. mutable is used for
ans--changing the value in the
const functions



Q1. __stdcall calling convention
Ans. stack is cleaned by the callee

Q2. mutable key word is used for
Ans. if used with a member variable it can be changes by a function declared as a constant

Q3. foo & const ref
Ans. this is not a good practise since references are always constants

Q4. private inheritance means
Ans Non private members of a base class become private members of derived class

Q5. int I=2;
Int j=3;
Int k=4;
Cout<<(IAns. 1

Q6 #defines macro(a) ((a++) + (++a) + (a++))
Main()
{
cout << macro(1);
}
Ans. 4

Q7 string s = “abcd”
Char &c=s[1];
String t;
T=s;
c=’z’;
if(T[1]==’z’)
{
cout<<”Quark”;
}
else
{
cout<<”express”;
}
Ans. express

Q8. int func(int I)
{
static int k=0;
k++;
if( K>5)
return 1;
else
return func(I-1);
}

int main()
{
cout << func(1);
}

Ans. 1



Q9. class base
{
public:
virtual func()
{
cout <<”BASE”;
}
};
class der1: public base
{
public:
virtual func()
{
cout << “DER1”;
}
};
class der2: public base
{
public:
virtual func()
{
cout << “DER2”;
}
};
class der3: public base
{
public:
virtual func1()
{
cout << “DER3”;
}
};
main()
{
base *pb;
pb= new der1;
pb->func();
pb= new der2;
pb->func();
pb= new der3;
pb->func();
}
Ans: DER1DER2BASE


Q10 Which of following will cause application crash…there are three options
ANS. char * p = new char;
Char *q=p;
Delete p;
Delete q;

Q11 for typeid to give correct result which condition is must
Ans. Class should be polymorphic

Q12 following things are default when class is created
Ans. Default constructor, copy constructor, assignment operator

Q13. which casting is done at run time
Ans. dynamic_cast


Quark Paper

1. 1 TB=1024GB
2. Windows NT, NT ?
3. HTTP full form
4. Windows Uses = ?
a) Intel
b) Microsoft
c) Dos
d) Macintosh
5. Operating System Runs in --- and system utilitis run in
a)user and monitor modes
b)monitor mode and user modes
6. For internet , what is required
a) an ISP provider
b) an Internet Connection
c) A Browser
d) All of the above.
7. What is Internet
8. How can u see the web pages
9. Largest capacity of the mobile storage ( CD ROM)
10. Floppy capacity ?
11. "www" stands for ?
12. which is a Netwoking os
a) microsoft win 98
b) Microsoft win 2000
13. Which is not a language ( Findler or J)



Analytical Problems :
=====================
1. A dice is thrown twice ..what is the probability of geting a
number twice ...(1/6)
2. 1,2,3,4,5 without repeating , make a no. divisible by 4
,probability
(1/5)
3. A girl walks x distance first day , second day she walks 1 km
more ..
total dist =65 km .time taken 18 hrs ( Ans --3 miles/h)
4. One puzzle about ages (Ans 9,2,2)
5. Some Histogram Questions
6. Some Pie charts Questions


C test :
========
1.char *str="quark" "media"
printf("%s",str); ( ans quark media )
2.char *str;
str="hello" "india"
printf("%s",str); ( ans hello india )
3.i=0;
z=sizeof(++i + i++)
printf("%d %d",z,i);
4.volatile keyword
5.macro XY ##
int main()
{
char *s;
x=XY10;
printf("%s",x);
}
6. int y=10;
for (int x=0;x<=10;x++);
y+=x;
printf("%d",y);
7.Differece between malloc ad calloc.
8.fun(int a)
{
static int b;
}
what is the storage allocation for both a and b;
9.int *fun(int a)
{
return (&a);
}
int *fun(int a)
{
int *b;
b=&a;
return(b);
}
int *fun(int a )
{
int *b;
b=malloc(sizeof(int));
b=&a;
return (b);
}
which of the following functions are not correct ;
10. int fun(int a,int y)
{
int x;
x=a+y;
return (x);
}
int main()
{
int x,y=1,z=0,c;
z=fun(y,c);
printf(" %d ",x);
}
11. int *x[10]()
what is x?
12. printf("%d",++i++); o/p ?
13. a=2;
printf("%d %d %d",++a,a++);
14.struct abc
{
char a[10];
int a,b;
};
main(){
struct abc ab={"main"};
printf("%d %d",ab.a,ab.c);

Quark Placement Paper : Whole Testpaper

QUARK Placement Sample Question Paper

There was an online written test

50 questions = 10 comp. awareness, 10 mathematical (easy), 10 verbal reasoning(difficult, lenghty, you are advised to attempt them at last only ), 20 c++ or c or Java whichever u opt.
then three interviews, (2 technical, one hr) are taken.
quarks people stress on c++, os, dbms, SE(testing, sdlc etc.) in the interview.

here are some questions that i can recall from the written test.

one question of c++

main()
{
int x=10,y=20,z=5;
x=x cout < }
ans 1


here quarks was on 12-8-03 and
recruit 2 mca,s and 12
be,s.

first you should opt test in c++,
because they have
only requirements in c++.
they will ask questions on virtual
functions,
destructures etc.

there are 50 questions and time is
60 mins.
1-10 analytical reasoning
11-20 quant
21-30 computer awearness
31-50 c++

c & c++ questions are diffirent in
quant and in comp
awearness.
the analytical reasoning will take
time so u should do
this at last i.e. by seeing the
length of question.

quant was easy

1. 165^2-164^2
a 329 ans
b 325

2. there is one question onloan
from father of 240
rupees the answer of that question
is 21.

3. all other question in this
section was easy.


computer awearness

1. Leading is....
options includes from msWord

2. which of the following is not
language
a. Pascal
b. pl/1
c. findles ans
d. j


3. one question on IPC(inter
process comm)

4. which of the following stores
highest amt of data.

a. floppy
b. cd
c. book
d. none of above

5. all other questions were from os



C++

1. can there be a static class


2. dynamic binding is
options


3 o/p of following prog

main()
{
int i,j=9999;
char buff[5];
i=sprintf(buff,"%d",j);

cout< }

a. 9999, 4
b 9999,5 ans
c 4,9999
d 9999,1



4. class ab{};
main()
{
cout< }

a 1
b 0 ans
c 2
d 4


5.

class ab
{
int i;
public:
virtual void fun(){}
}
main()
{
cout< }

a. 4 ans




6. when new fails it
a. send _set_new_handler
b. send excection
c.
d. both a and b



7. #define f(a,b) a+b
#define g(x,y) x*y
main()
{
int i;
i=f(4,g(5,6));
cout< }

a. 34 ans


8 #define x(a) ++a + a++ +a++
like this I do not
remember this question ans was 4.


9. polymorohism is

10. mutable is used for
ans--changing the value in the
const functions



Q1. __stdcall calling convention
Ans. stack is cleaned by the callee

Q2. mutable key word is used for
Ans. if used with a member variable it can be changes by a function declared as a constant

Q3. foo & const ref
Ans. this is not a good practise since references are always constants

Q4. private inheritance means
Ans Non private members of a base class become private members of derived class

Q5. int I=2;
Int j=3;
Int k=4;
Cout<<(IAns. 1

Q6 #defines macro(a) ((a++) + (++a) + (a++))
Main()
{
cout << macro(1);
}
Ans. 4

Q7 string s = “abcd”
Char &c=s[1];
String t;
T=s;
c=’z’;
if(T[1]==’z’)
{
cout<<”Quark”;
}
else
{
cout<<”express”;
}
Ans. express

Q8. int func(int I)
{
static int k=0;
k++;
if( K>5)
return 1;
else
return func(I-1);
}

int main()
{
cout << func(1);
}

Ans. 1



Q9. class base
{
public:
virtual func()
{
cout <<”BASE”;
}
};
class der1: public base
{
public:
virtual func()
{
cout << “DER1”;
}
};
class der2: public base
{
public:
virtual func()
{
cout << “DER2”;
}
};
class der3: public base
{
public:
virtual func1()
{
cout << “DER3”;
}
};
main()
{
base *pb;
pb= new der1;
pb->func();
pb= new der2;
pb->func();
pb= new der3;
pb->func();
}
Ans: DER1DER2BASE


Q10 Which of following will cause application crash…there are three options
ANS. char * p = new char;
Char *q=p;
Delete p;
Delete q;

Q11 for typeid to give correct result which condition is must
Ans. Class should be polymorphic

Q12 following things are default when class is created
Ans. Default constructor, copy constructor, assignment operator

Q13. which casting is done at run time
Ans. dynamic_cast


Quark Paper

1. 1 TB=1024GB
2. Windows NT, NT ?
3. HTTP full form
4. Windows Uses = ?
a) Intel
b) Microsoft
c) Dos
d) Macintosh
5. Operating System Runs in --- and system utilitis run in
a)user and monitor modes
b)monitor mode and user modes
6. For internet , what is required
a) an ISP provider
b) an Internet Connection
c) A Browser
d) All of the above.
7. What is Internet
8. How can u see the web pages
9. Largest capacity of the mobile storage ( CD ROM)
10. Floppy capacity ?
11. "www" stands for ?
12. which is a Netwoking os
a) microsoft win 98
b) Microsoft win 2000
13. Which is not a language ( Findler or J)



Analytical Problems :
=====================
1. A dice is thrown twice ..what is the probability of geting a
number twice ...(1/6)
2. 1,2,3,4,5 without repeating , make a no. divisible by 4
,probability
(1/5)
3. A girl walks x distance first day , second day she walks 1 km
more ..
total dist =65 km .time taken 18 hrs ( Ans --3 miles/h)
4. One puzzle about ages (Ans 9,2,2)
5. Some Histogram Questions
6. Some Pie charts Questions


C test :
========
1.char *str="quark" "media"
printf("%s",str); ( ans quark media )
2.char *str;
str="hello" "india"
printf("%s",str); ( ans hello india )
3.i=0;
z=sizeof(++i + i++)
printf("%d %d",z,i);
4.volatile keyword
5.macro XY ##
int main()
{
char *s;
x=XY10;
printf("%s",x);
}
6. int y=10;
for (int x=0;x<=10;x++);
y+=x;
printf("%d",y);
7.Differece between malloc ad calloc.
8.fun(int a)
{
static int b;
}
what is the storage allocation for both a and b;
9.int *fun(int a)
{
return (&a);
}
int *fun(int a)
{
int *b;
b=&a;
return(b);
}
int *fun(int a )
{
int *b;
b=malloc(sizeof(int));
b=&a;
return (b);
}
which of the following functions are not correct ;
10. int fun(int a,int y)
{
int x;
x=a+y;
return (x);
}
int main()
{
int x,y=1,z=0,c;
z=fun(y,c);
printf(" %d ",x);
}
11. int *x[10]()
what is x?
12. printf("%d",++i++); o/p ?
13. a=2;
printf("%d %d %d",++a,a++);
14.struct abc
{
char a[10];
int a,b;
};
main(){
struct abc ab={"main"};
printf("%d %d",ab.a,ab.c);

Quark Placement Paper : Whole Testpaper

VERBAL SECTION
Directions: Give the synonyms for the following words

1. Depreciation: deflation, depression, devaluation, fall, slump

2. Deprecate : feel and express disapproval,

3. Incentive : thing one encourages one to do (stimulus)

4. Echelon : level of authority or responsibility

5. Innovation : make changes or introduce new things

6. Intermittent : externally stopping and then starting

7. Detrimental: harmful

8. Conciliation : make less angry or more friendly

9. Orthodox: conventional or traditional, superstitious

10. Fallible : liable to error

11. Volatile : ever changing

12. Manifest: clear and obvious

13. Connotation : suggest or implied meaning of expression

14. Reciprocal: reverse or opposite

15. Agrarian : related to agriculture

16. Vacillate : undecided or dilemma

17. Expedient : fitting proper, desirable

18. Simulate : produce artificially resembling an existing one.

19. Access : to approach

20. Compensation: salary

21. Truncate : shorten by cutting

22. Adherence : stick

23. Heterogeneous: non similar things

24. Surplus : excessive

25. Assess : determine the amount or value

26. Cognizance : knowledge

27. Retrospective : review

28. Naive : innocent, rustic

29. Equivocate : tallying on both sides, lie, mislead

30. Postulate : frame a theory

31. Latent : dormant, secret

32. Fluctuation : wavering,

33. Eliminate : to reduce

34. Affinity : strong liking

35. Expedite : hasten

36. Console : to show sympathy

37. Adversary : opposition

38. Affable : lovable or approachable

39. Decomposition : rotten

40. Agregious : apart from the crowd, especially bad

41. Conglomeration: group, collection

42. Aberration: deviation

43. Augury : prediction

44. Creditability : ability to common belief, quality of being credible

45. Coincident: incidentally

46. Constituent : accompanying

47. Differential : having or showing or making use of

48. Litigation : engaging in a law suit

49. Moratorium: legally or officially determined period of delay before fulfillment of the agreement of paying of debts.

50. Negotiate : discuss or bargain

51. Preparation : act of preparing

52. Preponderant : superiority of power or quality

53. Relevance : quality of being relevant

54. Apparatus : appliances

55. Ignorance : blindness, in experience

56. Obsession: complex enthusiasm

57. precipitate : speed, active


SERIES SECTION
Directions: In the following questions complete the series
NOTE: This section is quite tough and consists of 26 questions to be done in 10 minutes. Please keep track of time.

1. A C B D E F G I - I H K J L
Ans. H

2. A I Z B E Y C I X D I - G E N J W
Ans. W

3. A D G J M P - R W T S
Ans. S

4. A B C E F G I J K - M L O N P
Ans. M

5. A B F G K L P Q - T S V U W
Ans. U

6. J W X U V S T - Q P S E T
Ans. Q

7. A R H X Y T D T W S T - N P T K R
Ans. P

8. F M B I P Z V I E V - I R Y O U

9. N Z I Y C X KW F - J F V M Y
Ans. V

10. A A S A S P A S P K A - R Q T S U
Ans. S

11. A E C P S - T R U E
Ans. U

12. B B P R D D L N F F I K - H Q J I K
Ans. H

13 A Z E X I V M T - R Q N S O
Ans. Q

14. A B D G K P - L I W U X
Ans. U

15. B C D A E G H I F J L M N L K N M O
Ans. K

16. X W E F G V U H I J K - P N S R T
Ans. T

17. O D J T O P Q N O E R T - Q O U V W
Ans. O

18. P R N U U P E J R B B - H V U N E
Ans. E

19.L U L M G M N F N P S - O N Q P S
Ans. P


NUMERICAL ABILITY
1. 420% OF 7.79 = ?
Ans. 32.718

2. 3427 / 16.53 = ?
Ans. 202

3. 10995 /95 = ?
Ans.115.7365

4. 43+557-247 =?
Ans. 353

5. 3107*3.082= ?
Ans. 9591

6. 48.7 + 24.9 - 8.7 = ?
Ans. 64.90

7.525.0/47.8 = ?
Ans. 11

8. (135-30-14)*7 - 6 +2 = ?
Ans. 3

9. 3/8 * 5.04=?
Ans. 1.89

10. 697 /219 = ?
Ans. 3.18

11.8/64 +64/16 =?
Ans. 4.14

12. 298 * 312 / 208 = ?
Ans. 453.54

13. 0.33 *1496 /13 = ?
Ans. 37.98

14.0.26 + 1/8 = ?
Ans. 0.385

15. 66.17+1/3= ?
Ans. 67.03

16. 2.84+1/4= ?
Ans. 3.09

17. 33% OF 450 = ?
Ans. 148.5

18. 907.54 / 0,3073= ?
Ans.3002

19.There are two categories of persons in ratio A:B = 2:3. A type earns 2.5 dollars/hr and B type 1 dollar/hr total money earned by both is 24dollars. Then what is the total number of persons
Ans. 15

20. Total balls are z, the number of red balls is n and the remaining are blak balls,then the % of black balls equal to ?
Ans. (z - n) / z*100

21. If A = C, B = 2D what should be done to make the ratio same. i.e.a/b = c/d
Ans. Multiply A by 2

22. If P=Total number of components, Q = number of defective components .What is the % of non defective components?
Ans. (p-q) / p*100

23. If the cost of an article is x , first discount given is y% of cost, second discount given is z% of cost. The selling price of x is
Ans. x (1-y / 100) (1- z / 100)

24.Which of the following are prime numbers
(a) 119 (b) 115 (c) 127 (d) none
Ans. (c)

25. A / B = C; C > D then
(a) A is always greater than D (b) C is always greater than D
(c) B is always less than D (d) None of these
Ans. (a)

26. If B>C and AAns. ( A + B )C

27. If for H hours of work the salary is S and the employee gets x hours of medical leave, then what is the salary/hr ?
Ans. s/H-x

28. ( 1/6 of 596) / (0.695) = ?
Ans. 142

29. 35-30 + 4/7 - 5 + 1 = ?
Ans. 3

30. 10995 + 95 = ?
Ans. 11090

31. If on a salary of Rs."S" per month,one has to pay one tax of x Rs. and a second type of tax of y Rs then % of salary taken home is?
Ans. s-(x+y)/s * 100

32. B>A then which expression will be highest value
(a) A-B (b) AB (c) A+B (d) Can,t Say
Ans. (b)

33. K, L are men who take home a salary of x, y respectively.The total amount taken home is
Ans. Kx + Ly

34. If out of X bulbs y bulbs are broken;The % of non broken bulbs
Ans. (x-y) / x*100

35. If on a salary s per month, a tax of x% of the salary and another of r% of the salary is deducted what is the income.
Ans. s*(1-(x+r)/100

36. 0.512 * 18902358 =?
Ans. 9678007.296

37. If the % of defective balls is 10% balls,and the number of defective balls is 5.The number of balls is
Ans.50

38. 6.29% of 2.8 =?
Ans. 0.18

39. 0.398 * 456= ?
Ans. 181.49

40. 0 < x < 1 which is greater
(a) 1/x2 (b) 1/x (c) x (d) x2
Ans. (a)

41. If c = a/b; a-1 = c, what is the relation between a and b?
Ans. b = a/a-1

42. What is the sum of 7 consecutive odd numbers with 27 as the fourth number
Ans.189



FLOWCHART SECTION
Directions: There are 7 flow charts and each has 5-6 blank rectangles/diamonds with sub question number in the rectangle/diamond. You have to fill the blank from the 5 options given against respective question number
NOTE: These types of questions are not at all tough. You have to understand the logic and then it is very easy to fill the blanks. Some information is provided for getting to the answers. There will be blanks which C - Question Paper
Note : There are 20 questions and no negative marking.
Time allotted is 30 minutes

1. What is the output of the following code
main()
{
printf("Hello %d",printf("QUARK test? "));
}
a. Compile time error.
b. Hello QUARK test?
c. Run time error.
d. None of the above.
e. Quark Test ?Hello.

Ans. d.
This is because the evaluation of the parameters in a function call is done from right to left, becz the parameters were passed via a stack hence the first parameter (the leftmost one) is at the bottom of the stack and the rightmost parameter (if it is an expresseion, it will be evaluated before putting it on the stack) is on the top of the stack, hence while popping the parameters from the stack, the function printf (or any other function) gets them in the reverse order, i.e., from right to left, hence the statement printf(“Quark test? “) gets evaluated first while pushing it as a parameter on to the stack, and then the statement printf(“Hello %d”) is executed. The ‘12’ is the result of the return of printf(“Quark test? “) which returns the number of characters printed.

2.) Out put of the following code is
main()
{
int i,j,A;
for (A = -1;A<=1; A++)
printf("%d\t",!!A);
}

a. 1 0 1
b. 65534 0 65534
c. -1 0 1
d. -65534 0 65534
e. None of the above

Ans. 1 0 1


3) What is the out put of the following code?
main()
{
int i=255;
printf("%d\t",++(i++));
}

a. Compilation error
b. Runtime error
c. 256
d. 0
e. None of the above

Ans. Compile Time Error ‘Lvalue Required


4) What shall be the output of the following code?
main()
{
char i = ,a,;
printf("%c \t %c \t", i ,(++i));
}
a. a b
b. Compile time error
c. b b
d. a a
e. 65 66

Ans. b b

5) What shall be the output of the following code?
main() {
int i,j;
printf(“QUARK %s\n”,main());
}
a. Compilation error.
b. Run-time error
c. Continuous scrolling Quark on the screen.
d. None of the above.

Ans. There is nothing on the screen and prog waits till the memory lasts and then out of memory run time error, so ans is b.

6) What shall be the output of the following code ?
#define f(x) x*x*x

main(){
printf("\n%d",f(2+2));
}
a. 8
b. 64
c. 10
d. 12

Ans. f(2+2) will expand to 2+2*2+2*2+2
= 2+4+4+2
= 12

7) What shall be the output of the following code ?
main()
{
void fun1(void *);
char a[] = "quark";
void *temp;
temp = a;
fun1(temp);}
void fun1(void *temp1 )
{
int t1 = 0;
while(*((char*)temp1+ t1++ )!=,\0,) {
printf("%c",*((char*)temp1 + t1));
}
}

a. Compilation error
b. ark
c. quark
d. uark

Ans, uark

8. What will be the out put of the following code?
void main()
{ int x=3;
printf("%d\t %d",x>>1, x<<3);
}
a. 1 and 4
b. 1 and 24
c. 1 and 27
d. None of the above

Ans. 1 and 24
This is because 3 in binary is 00000000 00000011 in two bytes (integer). Again, the right to left evaluation rule of parameters is applicable and so x<<3 gets executed first, it means left shift 3 times, but this operator does not change the value of x itself, it simply returns a value, so x retains its value after this operation has been carried out, so we get 00000000 00011000 which is 24, so 24 is pushed onto the stack, and then x>>1, right shift 1, 00000000 00000011, which is 1 in decimal, so 1 is pushed onto the stack, then printf("%d\t %d") gets executed displaying 1 24.

9. What will be the result of the following code?

int *x;
x =(int *) 15;
a. Compilation error
b. Compiles but gives a runtime error
c. Absolute location 15 in the memory space shall be assigned to pointer x;
d. Location 15 in the program space is assigned to pointer x;
e. Location 15 contains the address to an integer.

Ans d


10. Which of the following functions cannot be called from another file?

a. const void func(){ ……..}
b. extern void func(){………}
c. void func(){………}
d. static void func(){……….}

Ans. static

11. What will be the out come of the following code?

#include

int * func(){
static int x=0;
x++; return &x;
}
int main()
{
int * y = func();
printf("%d",(*y)++);
func();
printf("%d\n",*y);
return 0;
}

a. Compilation error.
b. Prints 1 and 3
c. Prints 1 and 3 but it is not good practice.
d. Prints 1 and 1
e. The code will not execute properly because y points to a variable whose life span is limited to execution of the function func();

Ans. Prints 1 and 3 but it is not a good practice

12. Referring to the above code , which of the following would be the correct
implementation for myFunc ?
char *format = “%d”;
int main()
{
int x;
myFunc(scanf,&x);
printf(“%d\n”,x);
return(0);
}

a. void myFunc(int(*y)(const char*,…),int *x) {(*y)(format,&x);}
b. void myFunc(int(*y)(const char*,…),int *x) {(*y)(format,*x);}
c. void myFunc(int*y(const char*,…),int *x) {(*y)(format,&x);}
d. void myFunc(*(int y(const char*,…)),int *x) {(*y)(format,x);}
e. void myFunc(int(*y)(const char*,…),int *x) {(*y)(format,x);}

13. What shall be the output of the following C code?
void main()
{
unsigned int x= -1;
int y =0;
if(y<=x) printf(“A is true\n”);
if (y = =(x = -10)) printf(“B is true\n”);
if ((int) x>=y) printf(“C is true\n”);
}
a. A is true.
b. B is true.
c. C is true.
d. None of the above.
Ans. A is true because x contains –1, i.e., in binary it is ffff, i.e., all 1s, so being unsigned, all 1s are interpreted as the value 65535 and not as –1 (however, all 1s are interpreted as –1 if it is just an int), hence y<=x returns true.

14. In the following code what is the correct way to increment the variable ptr to
point to the next member of the array

union intfloat
{
int intArray[ 5];
float floatArray[ 5];

};
union intfloat arr[20];
void *ptr =arr;

a. ++(int*)ptr;
b. ptr = ptr+5;
c. ptr = ptr +sizeof(*ptr);
d. ptr = ptr+sizeof(intfloat.floatArray);
e. ptr = (void*)((union intfloat*)ptr +1);

Ans. e. ptr = (void*)((union intfloat*)ptr +1);


15.What shall be the output of the following program?

#define PRINTXYZ(x,y,z) printf (#x "=%d\t" #z "=%d\n", x, y)

void main() {
int x, y, z;
x=0; y=1; z=2;

x || ++y ||++z;
PRINTXYZ(x,y,z);

++x || ++y && ++z;
PRINTXYZ(x,y,z);

++x && ++y || ++z;
PRINTXYZ(x,y,z);
}

a. Compilation error.
b. Runtime error.
c.
x=0 z=2
x=1 z=3
x=2 z=4
d.
x=0 z=2
x=1 z=2
x=2 z=3
e. None of the above.

Ans. d.

16. What shall be the output of the following code ?

main()
{
printf(“%d %d”, sizeof(NULL), sizeof(“”));
}

a. 1 and 0.
b. 0 and 1
c. 2 and 1
d. 4 and 1
e. None of the above

Ans. Depends on the machine and compiler. Actually it is the sizeof(int) and sizeof(char) as a string is stored as a char array terminated with 0, so sizeof(“”) gives 1, whereas sizeof(“adsf”) gives 5 (including the terminating 0). So in TurboC we get c as the answer, on VC we get d as the answer, so I guess e is the ans, i.e., None of the above.


17. What shall be the output of the following code?

int *check ( int,int);
void main()
{int c,d;
c = check(11,29);
d= check(20,30);
printf("\nc=%u",c);
}
int * check(int i,int j )
{
int *p, *q;
p=&i;
q=&j;
if(i>=95)
return(q);
else
return(p);
}
a. 11
b. 29
c. Compilation error
d. Runtime error
e. None of the above.
Ans. e. None of the above. the statement c = check(11,29) is assigning an int ptr to an int, so c has an address of an int (which has gone out of scope, since the function returns the address of a variable which had its scope only inside the function, since the parameters were passed by value) so the value printed can be anything. Instead, if the statement was c = *(check(11,29)) then c would have the value stored at the address returned by the function, which would most probably be 11, but it cannot be guaranteed since the variable i has fallen out of scope.


18. What shall be the output of the following code?

void main()
{int a[3][2]={ 1,2,
5,7,
6,8};

printf("\n%d",((a+1)-(&a+1)));
}
a. 0
b. -16
c. -2
d. -8
e. None of the above.

Ans. –2. I haven’t been able to figure this one out. a is the address of the 2-d array, here a, &a, *a all give the same value, i.e., address of the array. (a+1) gives the address of the second row, it is the same as a[1]. *(a+1) gives the address of the first cell of the second row. **(a+1) gives the value of the element stored in the first cell in the second row. (*(a+1)+1) gives the address of the second cell of the second row. *(*(a+1)+1) gives the value of the element stored in the second cell in the second row.

19.What shall be the output of the following code?
main()
{
char str1[]="Hello";
char str2[]="Hello";
if(str1= =str2&& (*(str1+6)= =*(str2+6)))
printf("\n Equal");
else
printf("\n unequal");
}
a. Equal
b. Unequal
c. Compilation error.
d. Runtime error.
e. None of the above.

Ans. b. Unequal, because the addresses of the two strings are str1 and str2 and they are different.

20. Given that sizeof(int) is 2 , what is the output of the following code
main()
{
int a, b=255,c=127;
a=~b;
c=c^(~a & b|0);\
c=c^(~(~b));
printf("%d\n",c);
}
a. Error because of overflow;
b. 255
c. –256
d. 127
e. None of the above
Ans. d. 127
Advertisement
By Category
Advertisement
Advertisement
Post Your Resume Here