Professional Documents
Culture Documents
section 2 – C Programming
4.output?
main() {
int i;
char *p;
i=0x89;
p=(char *)i;
p++;
printf(“%x\n”p); }
a)0x8c b)0x4566788A c)0x8A d)0x8B e)none (ans. (c))
6.when an array is passed as parameter to a function , which of the following statement is correct
the function can change values in the original array
in c parameters are passed by value the function cannot change the original value in the array
it results in compilation error.Array cannot be passed as a parameter to a function
results in runtime error when the function tries to access the elements in the array
7.the type of the controlling expression of a switch statement cannot be of the type
a)int b)char c)short d)float e)none (ans.(d))
8.value of (3^6)+(a ^a)=? (Ans. value=5)
10.output:
main() {
int n=2;
printf(“%d %d\n”,++n,n*n); }
a)3,6 b)3,4 c)2,4 d)cannot determine (ans.( b))
11.output:
int x=0x65;
main() {
char x;
printf(“%d\n”,x); }
a) Compilation error b)’A’ c)65 d)undefined
12.output
main() {
int a=10;
int b=6;
if(a=3)
b++;
printf(“%d %d”,a,b++); }
a)10,6 b)10,7 c)3,6 d)3,7 e)none
13.main() {
enum months {jan=1,feb,mar,apr};
months x=jan;
if(x==1)
printf(“jan is the first month”); }
a)does not print anything b)prints : jan is the first month
c)generates compilation error d)results in runtime error (ans. (c))
15.main() {
int i=6;
switch(i) {
default: i+=2;
case 4;i=4;
case 5:i++;
break; }
printf(“%d”,i); }
a)8 b)6 c)5 d)4 e)none (ans. (c))
16.main() {
int x=20;
int y=10;
swap(x,y);
printf(“%d %d”,y,x+2); }
swap(int x,int y) {
int temp;
temp=x;
x=y;
y=temp; }
a)10,20 b)20,12 c)22,10 d)10,22 e)none
18.struct node{
char *word;
int count;
struct node left;
struct node right; };
a)incorrect definiton b)structures cannot refer to other structrues
c)structures can refer to themselves. Hence the statement is ok
d)structures can refer to maximum of one other structure
20. main() {
char s[]=”hello world”;
printf(“%15.10s”,s); }
a)hello,.world… b)…..hello world c)heloo,.wor….. d)none of the above (ans.(b))
· Written Test
The written test consists of 60 questions which are divided into 4 sections .The total duration of
the test is 90 minutes. There is negative marking .
Section#2
This section also consists of 15 questions. Questions based on C language are asked.
In this section:
A correct answer carries 1 mark
1/4 marks will be deducted for a wrong answer.
Section#3
A total of 10 questions based on pointers and structures in C are asked in this section. You can
also be asked one or two questions on JAVA also.
In this section:
A correct answer carries 2 marks
1 mark will be deducted for a wrong answer.
Section#4
This is the aptitude section consisting of 20 questions. Simple maths questions are asked which
are very easy. The logical questions asked are similar to the ones given in the Barron's GRE
book.
In this section:
A correct answer carries 2 marks
1/2 mark will be deducted for a wrong answer.
· Profile
HCL Technologies offers world class technology solutions for the emerging network centric
world. It provides a range of technology and software engineering services including
Technology Development Services, Software Engineering Services, Application
Engineering Services, Networking Services .
These services are predicated on a rich technology heritage. Experience with the development
and application of technologies like Internet and E-Commerce, Embedded software,
Networking and telecom protocols, VLSI design etc.
Skills on a wide variety of computing platforms from Open Systems to Enterprise Servers
based on mainframes expertise, object oriented and legacy system architecture, methodologies
in addition to distinguished R&D background uniquely positions us as a preferred provider of
technology and software engineering services in the emerging network centric world.
HCL Technologies has established dedicated offshore software factories with clients such as
Bankers Trust (Australia), Lexis Nexis (US) , Southern California Edison (US), A Networking
Major (US)
HCL Technologies operates through 29 offices in 14 countries in United States, Europe, Japan,
Asia Pacific
The company employs 3300 IT professionals worldwide.
HCL Technologies holds 100% stake in Intelicent (former HCL James Martin Inc.), a US based
methodology consulting led Services Company. The company also has a 100% subsidiary in
India, HCL Comnet Systems and Services Ltd, which provides networking services.
For more information about this company visit their homesite at www.hcltechnologies.com
4. In signed magnitude notation what is the minimum value that can be represented with 8 bits
(a) -128 (b) -255 (c) -127 (d) 0 (Ans. (a))
6.For a 25 MHz processor, what is the time taken by the instruction which needs 3 clock cycles,
(a) 120 nano secs (b) 120 micro secs (c) 75 nano secs (d) 75 micro secs (Ans. (a))
13. There is an employee table with key fields as employer no.data in every not row are needed
for a sample.
Which of the following queries will get required results.
Select A employee no. from employee A , where exists (select (max (emp_no)))from employee
B where
A employee no. >= B employee having (count(*) mod n)=0
Select employee no. from employee A, employee B where A. employee no.>=B employ
no.group by employee no.having(count(*) mod n)=0 )
c) both a& b d)none of the above (ans. (d))
14. Type duplicates of a row in a table customer with non-unique key field customer no. Can
use
a) Delete from customer where customer no. Exists(select distinct customer no. from customer
having count)
delete customer a where customer no. in (select cust_no from customer b where
a.cust_no=b.cust_no)
and a.rowid>b.rowid
delete customer a where custermor no. in ( select customer no. from customer a, customer b
group by
a.cust_no having (count(*)>1) and a.rowid>b.rowid);
d) none of the above (ans. (d))
15.which of the following is a feature of the ANSI C language and not present in Java?
a)forward referencing b)variable length argument lists c)volatile modifier d)none of the above
(ans. (b))
6:10 AM
es.
cceeded.
repare well for the interview,( esp. technical
ut by the time I realized that there is nothing
r.
ul, as some companies ask you to explain how
d asynchronous counters.
ointer etc.
Segmentation or both….)
IBM]
stem?
mmars?
VA virtual machine)
CIP)
C++ are asked only in the pure software
t as your favourite subject.
ld.
luck is counted.
h at your answers and end up stammering,
ys who impress more. Smile in between (if you
ements. Don’t use complex terminology, which
ot).
good preparation many people find technical
M etc.]
o each of your employees so that one gets to
ome big firms like INFOSYS where some
at’s happening on the other side. So one can
work in your company.
ke:
the company?
ny?
?
company rather than our services company.
will get the job?
ve and optimistic way. Don’t leave hope or
-----------------------------------------
-----------------------------------------