Wednesday 23 March 2011

hcl placement experiance


Test Date : 5 September 2007
Test Location : madurai

HCL QUESTION PATTERN 2007(MADURAI KAMARAJ UNIVERSITY)

Hcl had visited in our campus at 5th sep 2007 so they had given the following Question pattern

It consist of 2 part.

In first part they had given 60 Aptitude ques and time duration for that was 45 min

In the second section it was fully Technical part, in that part 20 ques consist 4m C Apit only and the time duration for that was 15 min

NO Negative marking for any part .


In the first part consist of 4 section, every section had 15 ques

First section-Analogy-5,G.P series- 2,(+,-*,/) 4 ques on this basis it was some wat difficult e.g -2*3+4-5=14 and 4 option for that (i)+,- (ii)+,/ (iii)*,/ (iv)/,+

And the last 4 question which one is similar for that series

e.g- 64,125,216,343

(i)500(ii)600)(iii)512(iv)612

Second section-complete series-5 they had given 5 number in between that one blank so we have to identified wat is that number e.g – 12, 16,_, 20, 22 it was not so easy, and 5 ,and coding-decoding- 5 ques it was easy,one puzzle of sitting arrangement it was easy in that 6 person sat in a row in the face of east side in that it had given 4 information on basis of that we have to sat.

Third section- alphabet-5 ques,e.g what is the same alphabet on that word Confidence,1 data-Interpetion ,it was bar-graph on the basis of they had given 5 ques it was also easy,and last 5 ques I didn’t remember.

Fourth Section- it was fully English section, in that first 5 ques from grammar mistake,they had given 4 similar type of sentence and u have to find correct sentence,3 ques from antonyms and 4 ques 4m synonyms and last 3 ques was fill up we had to fill correct form of verb in that sentence

That’s all for the first part

Second part

It was 20 ques of c-apti and time duration was 15 min so in that section they had asked basic ques of c, so clear through basic concepts that sufficient , I hadn’t remember the ques but some ques was easy and some what was difficult………


Totally 307 student had sat for written and 119 got qualified written,out of 119 student 52 student are finally selected I was also lucky that my name was also in that

In interview it was fully HR ROUND

The ques asked 4m me was

i)Tell me abt urself?

ii)They had asked how you had joined this coll?

iii)Asked abt my native what is famous in ur native?

iv)My subject of intrest was oops so they had asked wat is oops with real time example?

v) They had asked data encapsulation of real time example?

vi)Do u have any relocation problem?

vii)Service bond for one and half year?

viii)Will you go for higher studies?


so mainly they had checked ur communication skill and confidence this is very important so be confident at the time….

Then defentely u will selected………….

ALL THE BEST
PRAVEEN KUMAR…..

hcl placement experiance


Test Date : 5 September 2007
Test Location : madurai

HCL QUESTION PATTERN 2007(MADURAI KAMARAJ UNIVERSITY)

Hcl had visited in our campus at 5th sep 2007 so they had given the following Question pattern

It consist of 2 part.

In first part they had given 60 Aptitude ques and time duration for that was 45 min

In the second section it was fully Technical part, in that part 20 ques consist 4m C Apit only and the time duration for that was 15 min

NO Negative marking for any part .


In the first part consist of 4 section, every section had 15 ques

First section-Analogy-5,G.P series- 2,(+,-*,/) 4 ques on this basis it was some wat difficult e.g -2*3+4-5=14 and 4 option for that (i)+,- (ii)+,/ (iii)*,/ (iv)/,+

And the last 4 question which one is similar for that series

e.g- 64,125,216,343

(i)500(ii)600)(iii)512(iv)612

Second section-complete series-5 they had given 5 number in between that one blank so we have to identified wat is that number e.g – 12, 16,_, 20, 22 it was not so easy, and 5 ,and coding-decoding- 5 ques it was easy,one puzzle of sitting arrangement it was easy in that 6 person sat in a row in the face of east side in that it had given 4 information on basis of that we have to sat.

Third section- alphabet-5 ques,e.g what is the same alphabet on that word Confidence,1 data-Interpetion ,it was bar-graph on the basis of they had given 5 ques it was also easy,and last 5 ques I didn’t remember.

Fourth Section- it was fully English section, in that first 5 ques from grammar mistake,they had given 4 similar type of sentence and u have to find correct sentence,3 ques from antonyms and 4 ques 4m synonyms and last 3 ques was fill up we had to fill correct form of verb in that sentence

That’s all for the first part

Second part

It was 20 ques of c-apti and time duration was 15 min so in that section they had asked basic ques of c, so clear through basic concepts that sufficient , I hadn’t remember the ques but some ques was easy and some what was difficult………


Totally 307 student had sat for written and 119 got qualified written,out of 119 student 52 student are finally selected I was also lucky that my name was also in that

In interview it was fully HR ROUND

The ques asked 4m me was

i)Tell me abt urself?

ii)They had asked how you had joined this coll?

iii)Asked abt my native what is famous in ur native?

iv)My subject of intrest was oops so they had asked wat is oops with real time example?

v) They had asked data encapsulation of real time example?

vi)Do u have any relocation problem?

vii)Service bond for one and half year?

viii)Will you go for higher studies?


so mainly they had checked ur communication skill and confidence this is very important so be confident at the time….

Then defentely u will selected………….

ALL THE BEST
PRAVEEN KUMAR…..

hcl placement experiance


Test Date : 5 September 2007
Test Location : madurai

HCL QUESTION PATTERN 2007(MADURAI KAMARAJ UNIVERSITY)

Hcl had visited in our campus at 5th sep 2007 so they had given the following Question pattern

It consist of 2 part.

In first part they had given 60 Aptitude ques and time duration for that was 45 min

In the second section it was fully Technical part, in that part 20 ques consist 4m C Apit only and the time duration for that was 15 min

NO Negative marking for any part .


In the first part consist of 4 section, every section had 15 ques

First section-Analogy-5,G.P series- 2,(+,-*,/) 4 ques on this basis it was some wat difficult e.g -2*3+4-5=14 and 4 option for that (i)+,- (ii)+,/ (iii)*,/ (iv)/,+

And the last 4 question which one is similar for that series

e.g- 64,125,216,343

(i)500(ii)600)(iii)512(iv)612

Second section-complete series-5 they had given 5 number in between that one blank so we have to identified wat is that number e.g – 12, 16,_, 20, 22 it was not so easy, and 5 ,and coding-decoding- 5 ques it was easy,one puzzle of sitting arrangement it was easy in that 6 person sat in a row in the face of east side in that it had given 4 information on basis of that we have to sat.

Third section- alphabet-5 ques,e.g what is the same alphabet on that word Confidence,1 data-Interpetion ,it was bar-graph on the basis of they had given 5 ques it was also easy,and last 5 ques I didn’t remember.

Fourth Section- it was fully English section, in that first 5 ques from grammar mistake,they had given 4 similar type of sentence and u have to find correct sentence,3 ques from antonyms and 4 ques 4m synonyms and last 3 ques was fill up we had to fill correct form of verb in that sentence

That’s all for the first part

Second part

It was 20 ques of c-apti and time duration was 15 min so in that section they had asked basic ques of c, so clear through basic concepts that sufficient , I hadn’t remember the ques but some ques was easy and some what was difficult………


Totally 307 student had sat for written and 119 got qualified written,out of 119 student 52 student are finally selected I was also lucky that my name was also in that

In interview it was fully HR ROUND

The ques asked 4m me was

i)Tell me abt urself?

ii)They had asked how you had joined this coll?

iii)Asked abt my native what is famous in ur native?

iv)My subject of intrest was oops so they had asked wat is oops with real time example?

v) They had asked data encapsulation of real time example?

vi)Do u have any relocation problem?

vii)Service bond for one and half year?

viii)Will you go for higher studies?


so mainly they had checked ur communication skill and confidence this is very important so be confident at the time….

Then defentely u will selected………….

ALL THE BEST
PRAVEEN KUMAR…..

hcl placement experiance by sanddep singh

Paper Type :
Test Date : 4 August 2007
Test Location : MSIT, New Delhi

Hi Friends…

I m Sarandeep. Rite now m pursuing my B.tech from GTBIT (GGSIPU) in ECE (4th yr). The HCL tech written paper was held on 4th August, 2007 at MSIT, Delhi and Interview was held on 24th August..



There was 1 written paper and HR Interview.





WRITTEN PAPER.



1Aptitude (Common to all)



There were total 60 questions.

No negative marking.

Time Limit: 50 mins



Ques on Bar chart, Reading Comprehension, Data Interpretation, Q.A , Data Sufficiency/Insufficiency, Puzzle Test, Basic computing knowledge, Flow charts, Microprocessor etc….



2Technical Paper (For CS/IT)



There were total 25 questions

Time Limit: 20 mins

Ques on C, C++, DBMS and Data structures.





3HR INTERVIEW



Basic HR ques that were asked:-

1.) Your Introduction?

2.) Your objective?

3.) Tell me something about your family? (This is their favorite question so prepare it well)

4.) Why HCL?

5.) If you are already placed in another company, then why HCL over that company?

6.) What do u know about HCL?.(www.hcltech.com and PPT)

7.) Incidents in support of all that u have mentioned in C.V? (V.imp)

8.) How are you different than other candidates? Why should we recruit you?

9.) What’s unique about you?

10.)Any plans for higher studies? (Big No!!!!)

11.) Any Problem in Relocation? (Strict no no.).

12.)Your Hobbies, Interests, Strengths and Weaknesses, some other ques from C.V.

13.) One thing that irritates you the most and why?

14.) You may need to explain your projects also.

15.) Do you want to ask something from me? (Prepare a good question as not asking any question shows serious disinterest towards company, plz don’t ask that’s already told in the presentation. You can also say that “I m fully satisfied with the presentation”)



FINALLY, the statistics.

Around 250 students gave the Paper.

Around 150 cleared the written.

And finally, around 80 were selected.

And by the grace of God, I got selected.



All the best, Prepare well….

See u at HCL Tech…

Sarandeep Singh.

hcl placement experiance by sanddep singh

Paper Type :
Test Date : 4 August 2007
Test Location : MSIT, New Delhi

Hi Friends…

I m Sarandeep. Rite now m pursuing my B.tech from GTBIT (GGSIPU) in ECE (4th yr). The HCL tech written paper was held on 4th August, 2007 at MSIT, Delhi and Interview was held on 24th August..



There was 1 written paper and HR Interview.





WRITTEN PAPER.



1Aptitude (Common to all)



There were total 60 questions.

No negative marking.

Time Limit: 50 mins



Ques on Bar chart, Reading Comprehension, Data Interpretation, Q.A , Data Sufficiency/Insufficiency, Puzzle Test, Basic computing knowledge, Flow charts, Microprocessor etc….



2Technical Paper (For CS/IT)



There were total 25 questions

Time Limit: 20 mins

Ques on C, C++, DBMS and Data structures.





3HR INTERVIEW



Basic HR ques that were asked:-

1.) Your Introduction?

2.) Your objective?

3.) Tell me something about your family? (This is their favorite question so prepare it well)

4.) Why HCL?

5.) If you are already placed in another company, then why HCL over that company?

6.) What do u know about HCL?.(www.hcltech.com and PPT)

7.) Incidents in support of all that u have mentioned in C.V? (V.imp)

8.) How are you different than other candidates? Why should we recruit you?

9.) What’s unique about you?

10.)Any plans for higher studies? (Big No!!!!)

11.) Any Problem in Relocation? (Strict no no.).

12.)Your Hobbies, Interests, Strengths and Weaknesses, some other ques from C.V.

13.) One thing that irritates you the most and why?

14.) You may need to explain your projects also.

15.) Do you want to ask something from me? (Prepare a good question as not asking any question shows serious disinterest towards company, plz don’t ask that’s already told in the presentation. You can also say that “I m fully satisfied with the presentation”)



FINALLY, the statistics.

Around 250 students gave the Paper.

Around 150 cleared the written.

And finally, around 80 were selected.

And by the grace of God, I got selected.



All the best, Prepare well….

See u at HCL Tech…

Sarandeep Singh.

hcl placement experiance by sanddep singh

Paper Type :
Test Date : 4 August 2007
Test Location : MSIT, New Delhi

Hi Friends…

I m Sarandeep. Rite now m pursuing my B.tech from GTBIT (GGSIPU) in ECE (4th yr). The HCL tech written paper was held on 4th August, 2007 at MSIT, Delhi and Interview was held on 24th August..



There was 1 written paper and HR Interview.





WRITTEN PAPER.



1Aptitude (Common to all)



There were total 60 questions.

No negative marking.

Time Limit: 50 mins



Ques on Bar chart, Reading Comprehension, Data Interpretation, Q.A , Data Sufficiency/Insufficiency, Puzzle Test, Basic computing knowledge, Flow charts, Microprocessor etc….



2Technical Paper (For CS/IT)



There were total 25 questions

Time Limit: 20 mins

Ques on C, C++, DBMS and Data structures.





3HR INTERVIEW



Basic HR ques that were asked:-

1.) Your Introduction?

2.) Your objective?

3.) Tell me something about your family? (This is their favorite question so prepare it well)

4.) Why HCL?

5.) If you are already placed in another company, then why HCL over that company?

6.) What do u know about HCL?.(www.hcltech.com and PPT)

7.) Incidents in support of all that u have mentioned in C.V? (V.imp)

8.) How are you different than other candidates? Why should we recruit you?

9.) What’s unique about you?

10.)Any plans for higher studies? (Big No!!!!)

11.) Any Problem in Relocation? (Strict no no.).

12.)Your Hobbies, Interests, Strengths and Weaknesses, some other ques from C.V.

13.) One thing that irritates you the most and why?

14.) You may need to explain your projects also.

15.) Do you want to ask something from me? (Prepare a good question as not asking any question shows serious disinterest towards company, plz don’t ask that’s already told in the presentation. You can also say that “I m fully satisfied with the presentation”)



FINALLY, the statistics.

Around 250 students gave the Paper.

Around 150 cleared the written.

And finally, around 80 were selected.

And by the grace of God, I got selected.



All the best, Prepare well….

See u at HCL Tech…

Sarandeep Singh.

hcl placement experiance

Paper Type : Candidate Experiences
Test Date : 7 July 2007
Test Location : NIT Kurukshetra, Kurukshetra

HCL PAPER ON 7th JULY

Hi guys ,i would like to share something about HCL placement procedure ,in which i got placed. there is online test which is of 55 min

the online test consists of
a total 60 general aptitude questions and 25 questions on technical for only computer science and an optional 10 questions on c for all non IT optional in the sence there is no compulsion in atteding the c questions there are any how not to be counted but if attempted some plus point in interview

only personel hr round
numerical questions 10
ex :which is greater in 4*2½,3+5¼,
arthmetical reasoning 10 questions
flow charts 10
computer algorithms 10
english 15 questions
for non IT guys 70 questions in 55min ,for cse or IT 85 questions in 70 min

for every section there is cut off so u should maintain time to attempt atleast 4 questions right from each section ,the question paper is medium if u do r.s aggarwal u can have idea to do well , there are 2 to 3 questions in english alphabet coding that is like if abcde is bcdef what will ijklmn represent like this questions ,and flow charts, that is one flow chrt is given and below 5 question s are given according to flow chart u have calculate ome values and nswer questions,and also pie chart questions also given better to stuy r.s aggarwal or gre barrons,and in english passages 2to 3 passages, correction of sentences ,filling the suitable articles ie., a,the,an

what all u should see is u go on answering the questiong suppose if know 1st question try to solve and answer don't know guss and attempt any fluke ,dont think again u wiill not have time to come to ist question.any how no negative marking

ok i have done well and cleared written and attended the interview which is very formal like they asked tell about details percentage,family background and with god's grace and luck i have selected in HCL be confident in interview try to answer questions with smiling face

All the best
A.Yeswanth

hcl placement experiance

Paper Type : Candidate Experiences
Test Date : 7 July 2007
Test Location : NIT Kurukshetra, Kurukshetra

HCL PAPER ON 7th JULY

Hi guys ,i would like to share something about HCL placement procedure ,in which i got placed. there is online test which is of 55 min

the online test consists of
a total 60 general aptitude questions and 25 questions on technical for only computer science and an optional 10 questions on c for all non IT optional in the sence there is no compulsion in atteding the c questions there are any how not to be counted but if attempted some plus point in interview

only personel hr round
numerical questions 10
ex :which is greater in 4*2½,3+5¼,
arthmetical reasoning 10 questions
flow charts 10
computer algorithms 10
english 15 questions
for non IT guys 70 questions in 55min ,for cse or IT 85 questions in 70 min

for every section there is cut off so u should maintain time to attempt atleast 4 questions right from each section ,the question paper is medium if u do r.s aggarwal u can have idea to do well , there are 2 to 3 questions in english alphabet coding that is like if abcde is bcdef what will ijklmn represent like this questions ,and flow charts, that is one flow chrt is given and below 5 question s are given according to flow chart u have calculate ome values and nswer questions,and also pie chart questions also given better to stuy r.s aggarwal or gre barrons,and in english passages 2to 3 passages, correction of sentences ,filling the suitable articles ie., a,the,an

what all u should see is u go on answering the questiong suppose if know 1st question try to solve and answer don't know guss and attempt any fluke ,dont think again u wiill not have time to come to ist question.any how no negative marking

ok i have done well and cleared written and attended the interview which is very formal like they asked tell about details percentage,family background and with god's grace and luck i have selected in HCL be confident in interview try to answer questions with smiling face

All the best
A.Yeswanth

hcl placement experiance

Paper Type : Candidate Experiences
Test Date : 7 July 2007
Test Location : NIT Kurukshetra, Kurukshetra

HCL PAPER ON 7th JULY

Hi guys ,i would like to share something about HCL placement procedure ,in which i got placed. there is online test which is of 55 min

the online test consists of
a total 60 general aptitude questions and 25 questions on technical for only computer science and an optional 10 questions on c for all non IT optional in the sence there is no compulsion in atteding the c questions there are any how not to be counted but if attempted some plus point in interview

only personel hr round
numerical questions 10
ex :which is greater in 4*2½,3+5¼,
arthmetical reasoning 10 questions
flow charts 10
computer algorithms 10
english 15 questions
for non IT guys 70 questions in 55min ,for cse or IT 85 questions in 70 min

for every section there is cut off so u should maintain time to attempt atleast 4 questions right from each section ,the question paper is medium if u do r.s aggarwal u can have idea to do well , there are 2 to 3 questions in english alphabet coding that is like if abcde is bcdef what will ijklmn represent like this questions ,and flow charts, that is one flow chrt is given and below 5 question s are given according to flow chart u have calculate ome values and nswer questions,and also pie chart questions also given better to stuy r.s aggarwal or gre barrons,and in english passages 2to 3 passages, correction of sentences ,filling the suitable articles ie., a,the,an

what all u should see is u go on answering the questiong suppose if know 1st question try to solve and answer don't know guss and attempt any fluke ,dont think again u wiill not have time to come to ist question.any how no negative marking

ok i have done well and cleared written and attended the interview which is very formal like they asked tell about details percentage,family background and with god's grace and luck i have selected in HCL be confident in interview try to answer questions with smiling face

All the best
A.Yeswanth

hcl c technical questions

Instructions:1. Please ignore any case-sensitive errors and un-included libraries.
2. You may use the back of this question paper for any rough work.

Q1.main()
{
int i;
clrscr();
printf("%d", &i)+1;
scanf("%d", i)-1;
}
a. Runtime error.
b. Runtime error. Access violation.
c. Compile error. Illegal syntax
d. None of the above
Ans: d,printf( ) prints address/garbage of i,
scanf() dont hav & sign, so scans address for i
+1, -1 dont hav any effect on code
Q2.main(int argc, char *argv[])
{
(main && argc) ? main(argc-1, NULL) : return 0;
}
a. Runtime error.
b. Compile error. Illegal syntax
c. Gets into Infinite loop
d. None of the above
Ans: b) illegal syntax for using return
Q3.main()
{
int i;
float *pf;
pf = (float *)&i;
*pf = 100.00;
printf("\n %d", i);
}
a. Runtime error.
b. 100
c. Some Integer not 100
d. None of the above

Ans: d) 0
Q4.
main()
{
int i = 0xff ;
printf("\n%d", i<<2);
}
a. 4
b. 512
c. 1020
d. 1024

Ans: c) 1020

Q5.#define SQR(x) x * x
main()
{
printf("%d", 225/SQR(15));
}
a. 1
b. 225
c. 15
d. none of the above
Ans: b) 225

Q6.union u
{
struct st
{
int i : 4;
int j : 4;
int k : 4;
int l;
}st;
int i;
}u;
main()
{
u.i = 100;
printf("%d, %d, %d",u.i, u.st.i, u.st.l);
}
a. 4, 4, 0
b. 0, 0, 0
c. 100, 4, 0
d. 40, 4, 0
Ans: c) 100, 4, 0
Q7.union u
{
union u
{
int i;
int j;
}a[10];
 



Placement Papers

·     3i-Infotech
§     ABB
§     AMD
§     ANZ
§     Aalayance
§     Accel Frontline
§     Accenture
§     Aditi
§     Adobe
§     Alcatel
§     Allfon
§     Amazon
§     Amdocs
§     Aricent
§     Ashok Leyland
§     Axes
§     Aztec
§     BARC
§     BEL
§     BFL
§     BHEL
§     BSNL
§     Bajaj
§     BirlaSoft
§     Blue Star
§     Bosch
§     C-DOT
§     CDAC
§     CGI
§     CMC
§     CSC
§     CTS
§     Cadance
§     Calsoft
§     Capgemini
§     Caritor
§     Chatargee
§     Ciena
§     Cisco
§     CitiCorp
§     Cognizant
§     Comp. Associates
§     Convergys
§     Covansys
§     DBS
§     DRDO
§     DSRC
§     DeShaw
§     Dell
§     Deloitte
§     Delphi
§     Dharma
§     ELGI
§     EMC
§     ESSAR
§     EasyTech
§     Epson
§     Flextronics
§     FutureSoft
§     GE
§     Genpact
§     Geometric
§     Google
§     Grapecity
§     HAL
§     HCL
§     HP
§     Hexaware
§     Honeywell
§     Huawei
§     Hughes
§     I-Flex
§     I-Gate
§     I2 (i2)Tech.
§     IBM
§     ICICI
§     INFOSYS
§     ISRO
§     Inautix
§     IndusLogic
§     Integra
§     Intel
§     Intergraph
§     Interwoven
§     Ivega
§     KPIT
§     Kanbay
§     Keane
§     Kshema
§     Kyocera
§     L&T Infotech
§     Lehman Brothers
§     LgSoft
§     Logica CMG
§     Lucent
§     MBT
§     Mascot
§     Mastek
§     Microsoft
§     Mindtree
§     Motorola
§     Mphasis
§     NCR
§     NESS
§     NIIT
§     NTPC
§     Nokia
§     Novell
§     Nucleus
§     Ocwen
§     OnMobile
§     Oracle
§     PCS
§     PSI Data Systems
§     Patni
§     Perot Systems
§     Persistent
§     Philips
§     Polaris
§     Quark
§     Ramco
§     Reliance
§     SAIL
§     SAP
§     SATYAM
§     SBI
§     SISL
§     SUN
§     Samsung
§     Samtel
§     Sapient
§     Sasken
§     Scadent
§     Siemens
§     Sify
§     SoftSol
§     Sonata
§     Subex
§     Sutherland
§     Symphony
§     Synopsys
§     Syntel
§     TCS
§     TELCO
§     TVS Lucas
§     Talisma
§     Tata Elxsi
§     Tata Motors
§     Tavant
§     Tech Mahindra
§     Temenos
§     ThinkSoft
§     Trilogy
§     UbiNetics
§     Verifone
§     Veritas
§     Verizon
§     Virtusa
§     WIPRO
§     Wilco
§     Wipro Infotech
§     Xansa
§     Yahoo
§     ZTE
§     Zensar
§     iSOFT

Enter your email address:






Search


Search this site:




PLACEMENT PAPERS in EMAIL:


Get Your Dream Job! Post Your Resume Today!
  Contribute YOUR Placement Paper and Experience, Win Exciting Prizes   

(Paper) HCL Placement Question Paper: Solved (C Language)

Email Newsletter FREE SMS ALERTS  FACEBOOK , TWITTER

HCL Placement Question Paper: Solved (C Language)

Instructions:1. Please ignore any case-sensitive errors and un-included libraries.
2. You may use the back of this question paper for any rough work.

Q1.main()
{
int i;
clrscr();
printf("%d", &i)+1;
scanf("%d", i)-1;
}
a. Runtime error.
b. Runtime error. Access violation.
c. Compile error. Illegal syntax
d. None of the above
Ans: d,printf( ) prints address/garbage of i,
scanf() dont hav & sign, so scans address for i
+1, -1 dont hav any effect on code
Q2.main(int argc, char *argv[])
{
(main && argc) ? main(argc-1, NULL) : return 0;
}
a. Runtime error.
b. Compile error. Illegal syntax
c. Gets into Infinite loop
d. None of the above
Ans: b) illegal syntax for using return
Q3.main()
{
int i;
float *pf;
pf = (float *)&i;
*pf = 100.00;
printf("\n %d", i);
}
a. Runtime error.
b. 100
c. Some Integer not 100
d. None of the above

Ans: d) 0
Q4.
main()
{
int i = 0xff ;
printf("\n%d", i<<2);
}
a. 4
b. 512
c. 1020
d. 1024

Ans: c) 1020

Q5.#define SQR(x) x * x
main()
{
printf("%d", 225/SQR(15));
}
a. 1
b. 225
c. 15
d. none of the above
Ans: b) 225

Q6.union u
{
struct st
{
int i : 4;
int j : 4;
int k : 4;
int l;
}st;
int i;
}u;
main()
{
u.i = 100;
printf("%d, %d, %d",u.i, u.st.i, u.st.l);
}
a. 4, 4, 0
b. 0, 0, 0
c. 100, 4, 0
d. 40, 4, 0
Ans: c) 100, 4, 0
Q7.union u
{
union u
{
int i;
int j;
}a[10];
int b[10];
}u;
main()
{
printf("\n%d", sizeof(u));
printf(" %d", sizeof(u.a));
// printf("%d", sizeof(u.a[4].i));
}
a. 4, 4, 4
b. 40, 4, 4
c. 1, 100, 1
d. 40 400 4

Ans: 20, 200, error for 3rd printf
Q8.main()
{
int (*functable[2])(char *format, ...) ={printf, scanf};
int i = 100;
(*functable[0])("%d", i);
(*functable[1])("%d", i);
(*functable[1])("%d", i);
(*functable[0])("%d", &i);
}
a. 100, Runtime error.
b. 100, Random number, Random number, Random number.
c. Compile error
d. 100, Random number
Q9.main()
{
int i, j, *p;
i = 25;
j = 100;
p = &i; // Address of i is assigned to pointer p
printf("%f", i/(*p) ); // i is divided by pointer p
}
a. Runtime error.
b. 1.00000
c. Compile error
d. 0.00000

Ans: c) Error becoz i/(*p) is 25/25 i.e 1 which is int & printed as a float,
So abnormal program termination,
runs if (float) i/(*p) -----> Type Casting
Q10.main()
{
int i, j;
scanf("%d %d"+scanf("%d %d", &i, &j));
printf("%d %d", i, j);
}
a. Runtime error.
b. 0, 0
c. Compile error
d. the first two values entered by the user

Ans: d) two values entered, 3rd will be null pointer assignment
Q11.
main()
{
char *p = "hello world";
p[0] = 'H';
printf("%s", p);
}
a. Runtime error.
b. “Hello world”
c. Compile error
d. “hello world”

Ans: b) Hello world
Q12.main()
{
char * strA;
char * strB = I am OK;
memcpy( strA, strB, 6);
}
a. Runtime error.
b. I am OK
c. Compile error
d. I am O
Ans: c) I am OK is not in " "

Q13. How will you print % character?a. printf(“\%”)
b. printf(“\\%”)
c. printf(“%%”)
d. printf(“\%%”)

Ans: c) printf(" %% ");
Q14.
const int perplexed = 2;
#define perplexed 3
main()
{
#ifdef perplexed
#undef perplexed
#define perplexed 4
#endif
printf("%d",perplexed);
}
a. 0
b. 2
c. 4
d. none of the above
Ans: c)
Q15.struct Foo
{
char *pName;
};
main()
{
struct Foo *obj = malloc(sizeof(struct Foo));
clrscr();
strcpy(obj->pName,"Your Name");
printf("%s", obj->pName);
}
a. Your Name
b. compile error
c. Name
d. Runtime error

Ans a)
Q16.struct Foo
{
char *pName;
char *pAddress;
};
main()
{
struct Foo *obj = malloc(sizeof(struct Foo));
clrscr();
obj->pName = malloc(100);
obj->pAddress = malloc(100);
strcpy(obj->pName,"Your Name");
strcpy(obj->pAddress, "Your Address");
free(obj);
printf("%s", obj->pName);
printf("%s", obj->pAddress);
}
a. Your Name, Your Address
b. Your Address, Your Address
c. Your Name Your Name
d. None of the above

Ans: d) printd Nothing, as after free(obj), no memory is there containing
obj->pName & pbj->pAddress
Q17.main()
{
char *a = "Hello ";
char *b = "World";
clrscr();
printf("%s", strcat(a,b));
}
a. Hello
b. Hello World
c. HelloWorld
d. None of the above

Ans: b)
Q18.
main()
{
char *a = "Hello ";
char *b = "World";
clrscr();
printf("%s", strcpy(a,b));
}
a. “Hello”
b. “Hello World”
c. “HelloWorld”
d. None of the above
Ans: d) World, copies World on a, overwrites Hello in a.
Q19.void func1(int (*a)[10])
{
printf("Ok it works");
}
void func2(int a[][10])
{
printf("Will this work?");
}

main()
{
int a[10][10];
func1(a);
func2(a);
}
a. Ok it works
b. Will this work?
c. Ok it worksWill this work?
d. None of the above
Ans: c)
Q20.main()
{
printf("%d, %d", sizeof('c'), sizeof(100));
}
a. 2, 2
b. 2, 100
c. 4, 100
d. 4, 4
Ans: a) 2, 2
Q21.main()
{
int i = 100;
clrscr();
printf("%d", sizeof(sizeof(i)));
}
a. 2
b. 100
c. 4
d. none of the above

Ans: a) 2
Q22.
main()
{
int c = 5;
printf("%d", main||c);
}
a. 1
b. 5
c. 0
d. none of the above
Ans: a) 1, if we use main|c then error, illegal use of pointer

Q23.main()
{
char c;
int i = 456;
clrscr();
c = i;
printf("%d", c);
}
a. 456
b. -456
c. random number
d. none of the above
Ans: d) -56
Q24.void main ()
{
int x = 10;
printf ("x = %d, y = %d", x,--x++);
}
a. 10, 10
b. 10, 9
c. 10, 11
d. none of the above

Ans: d) Lvalue required
Q25.main()
{
int i =10, j = 20;
clrscr();
printf("%d, %d, ", j-- , --i);
printf("%d, %d ", j++ , ++i);
}
a. 20, 10, 20, 10
b. 20, 9, 20, 10
c. 20, 9, 19, 10
d. 19, 9, 20, 10
Ans: c)
Q26.
main()
{
int x=5;
clrscr();
for(;x==0;x--) {
printf("x=%d\n”", x--);
}
}
a. 4, 3, 2, 1, 0
b. 1, 2, 3, 4, 5
c. 0, 1, 2, 3, 4
d. none of the above
Ans: d) prints nothing, as condition x==0 is False
Q27main()
{
int x=5;
for(;x!=0;x--) {
printf("x=%d\n", x--);
}
}
a. 5, 4, 3, 2,1
b. 4, 3, 2, 1, 0
c. 5, 3, 1
d. none of the above
Ans: d) Infinite loop as x is decremented twice, it never be 0
and loop is going on & on

Q28main()
{
int x=5;
clrscr();
for(;x<= 0;x--)
{
printf("x=%d ", x--);
}
}
a. 5, 3, 1
b. 5, 2, 1,
c. 5, 3, 1, -1, 3
d. –3, -1, 1, 3, 5

Ans: prints nothing, as condition in loop is false.
Q29.main()
{
{
unsigned int bit=256;
printf("%d", bit);
}
{
unsigned int bit=512;
printf("%d", bit);
}
}
a. 256, 256
b. 512, 512
c. 256, 512
d. Compile error
Ans: 256, 512, becoz these r different blocks, so declaration allowed
Q30.main()
{
int i;
clrscr();
for(i=0;i<5;i++)
{
printf("%d\n", 1L << i);
}
}
a. 5, 4, 3, 2, 1
b. 0, 1, 2, 3, 4
c. 0, 1, 2, 4, 8
d. 1, 2, 4, 8, 16

Ans: d) L does't make any diff.
Q31.main()
{
signed int bit=512, i=5;
for(;i;i--)
{
printf("%d\n", bit = (bit >> (i - (i -1))));
}
}
a. 512, 256, 128, 64, 32
b. 256, 128, 64, 32, 16
c. 128, 64, 32, 16, 8
d. 64, 32, 16, 8, 4
Ans: b)
Q32.main()
{
signed int bit=512, i=5;
for(;i;i--)
{
printf("%d\n", bit >> (i - (i -1)));
}
}
a. 512, 256, 0, 0, 0
b. 256, 256, 0, 0, 0
c. 512, 512, 512, 512, 512
d. 256, 256, 256, 256, 256

Ans: d) bit's value is not changed
Q33.main()
{
if (!(1&&0))
{
printf("OK I am done.");
}
else
{
printf("OK I am gone.");
}
}
a. OK I am done
b. OK I am gone
c. compile error
d. none of the above
Ans: a)
Q34main()
{
if ((1||0) && (0||1))
{
printf("OK I am done.");
}
else
{
printf("OK I am gone.");
}
}
a. OK I am done
b. OK I am gone
c. compile error
d. none of the above
Ans: a)
Q35main()
{
signed int bit=512, mBit;
{
mBit = ~bit;
bit = bit & ~bit ;
printf("%d %d", bit, mBit);
}
}
a. 0, 0
b. 0, 513
c. 512, 0
d. 0, -513
Ans: d)