Placement Papers for All Companies

3i infotech
Abacus Infotech
Abatix
Abaxis
ABB
ACC Limited
Accel Frontline
Accenture
Aditi Technologies
Adobe System
ADP
Agilysys
AgreeYa
AIG
AirNet
Alanco Technologies
Alle Technologies
Allfon
Alter Systems
Amazon
AMDL
Amdocs
AMI
Amiti Software Technologies
ANZ
Apple
Applied Materials
Apps Associates
Aricent
ASDC
Ashok Leyland Ltd
Asian Paints
Aspire System
AT & T
Atlas Copco
Atos Origin
AXA Technology Services
Axes Technology
Bain
Bajaj
Bayer
Bharti Airtel Ltd
Bhawan Cybertek
Birlasoft
Blue Star Infotech
BMC
BOB
Brakes India
C-DOT
CA Technologies
Cadence
Calsoft
Canarys
Capgemini
Caterpillar
Celstream
CGI Group
Changepond Technologies
Cimtrix Systems
Cisco system
Citicorp Overseas Software Ltd
ClinTech
CMC Limited
CMS
Cognizant
Compaq
Consagous Technologies
Convergys
CORDYS
CRISIL
Crompton Greaves
CSC
CSFB
CtrlS Datacenters Ltd
Cummins
Cyient
Daffodil
Daimler
Dell
Deloitte
Delphi-TVS
Dharma Systems
Directi
DSRC
Eicher
ELGI
ELICO
EMC Corporation
Emphasis
Ericsson
Ernst & Young
ESKO
Essar
Facebook
Fanuc Corporation
Fidelity
Flextronics
Flipkart
Freescale
Fujitsu
Gajshield
GE
Genpact India
Geodesic
Geometric Limited
GlobalEdge
GlobalLogic
GMR Group
Godrej Infotech
Google
Grapecity
Harita - TVS
HCL
HCL Technologies
Headstrong
Healthasyst
HEC Ltd
Hexaware
HFCL
Holool
Honeywell
HP
HTC Global Services
Huawei
Hughes
Hyundai
IBM
IBS Software Services
IGate
Ikanos
IKOS
Impetus
iNautix
Indecomm
IndiaBulls Power Limited
Inductis-EXL
Industrial Alliance
Infineon
Infogain
Infosys
Intec
Integra
Intel
Intergraph
ITC Infotech
Jindal Steel and Power Limited
KPIT
L & T
L & T Infotech
LG Soft
Linde India Ltd
LnT Emsys
LnT-ECC
Lucas - TVS
Mahindra Engineering Services Ltd
Mahindra Ltd
Maruti
Matrix
Maveric Systems
McAfee
Microland
Microsoft
Mindtree
Miraclesoft
MKCL
Motorola
Mu-Sigma
Nagarro
NASSCOM
NCR Corporation
Ness Technologies
Neudesic
NIIT Technologies
Novell
Nvidia
Oracle
Persistent
Philips
Planetasia
Polaris
Poornam Info Vision
PSI Data Systems Limited
Quest-Global
Quinnox
R Systems
Redpine
Reliance Energy
Robert Bosch
RS Software
Samsung
SAP labs India
Sapient
Sasken Communications
Schneider India
Serco
Siemens
Sierra Atlantic
SkyTECH
Soliton
Sonata Software
Sony India
SQL Star
Steria
Subex Limited
Sutherland Global Services
Syntel
Talisma
Tata motors
Tata technologies
Tata-ELXSI
TCE
TCS
Tech Mahindra
Temenos
Tesco
Texas Instruments
Thermax
ThoughtWorks
Torry Harris
Triad
Trianz
Trilogy
TVS Motor
Unisys
UnitedHealth Group
UST Global
UTC Aerospace System
Valuelabs
Vedanta
Verifone
Verizon
Virtusa
Vision Infotech
Vizual
VMware
Wipro
Yahoo
YASH Technologies
Zenith
Zensar Technologies
ZTE

Dharma Systems Technical Questions with Answers 31st December 2011

Posted on :09-04-2016

Q1. What is the output of the following program?

void main()
{
float j;
j=1000*1000;
printf(%f, j);
}

a) 1000000
b) Overflow
c) Error
d) None

ANS: d


Q2. What are the number of syntax errors in the below program?

int f()
void main()
{
f(1);
f(1,2);
f(1,2,3);
}
f(int i, int j, int k)
{
printf(%d %d %d, i, j, k);
}

ANS: None


Q3. What is the output of the following program?

void main()
{
int count=10, *temp, sum=0;
temp= &count;
*temp= 20;
temp= ∑
*temp= count;
printf(%d %d %d, count, *temp, sum);
}

ANS: 20 20 20


Q4. What is the output of the following program?

main()
{
static i= 3;
printf(%d, i--);
return i>0 ? main():0;
}

ANS: 321


Q5. What is the output of the following program?

void main()
{
char *s[]={ dharma, hewlett- packard, siemens, ibm};
char **p;
p=s;
printf(%s, ++*p);
printf(%s, *p++);
printf(%s, ++*p);
}

ANS: harma (p->add(dharma) && (*p)-> harma)
harma (after printing, p-> add (hewlett-packard) &&(*p)->harma)


Q6. What is the output of the following program?

void main()
{
int d=5;
printf(%f,d);
}

ANS: Undefined


Q7. What is the output of the following program?

void main()
{
char *s= 12345s ;
printf(%d, sizeof(s));
}

ANS: 6


Q8. What is the output of the following program?

void main()
{
int i= 7;
printf(%d, i++* i++);
}

ANS: 56


Q9. What is the output of the following program?

char *foo()
{
char result[100]);
strcpy (result, anything is good);
return (result);
}
void main()
{
char *j;
j=foo()
printf(%s, j);
}

ANS: anything is good


Q10. What is the output of the following program?

void main()
{
int i;
for(i=1;i<4, i++)
switch(i)
case 1: printf (%d, i); break;
{
case 2:printf (%d, i); break;
case 3:printf (%d, i); break;
}
switch(i) case 4:printf (%d, i);
}

ANS: 1, 2, 3, 4


Q11. What is the output of the following program?

void main()
{
unsigned i=1; /* unsigned char k= -1 => k=255; */
signed j=-1; /* char k= -1 => k=65535 */
/* unsigned or signed int k= -1 =>k=65535 */
if(i 
printf (less);
else
if(i>j)
printf (greater);
else
if(i== j)
printf (equal);
}

ANS: less


Q12. What is the output of the following program?

#define one 0
#ifdef one
printf(one is defined );
#ifndef one
printf(one is not defined );

ANS: one is defined


Q13. How do you declare an array of N pointers to functions returning pointers to functions returning pointers to characters?

ANS: The first part of this question can be answered in at least three ways:

1. char *(*(*a[N])())();
2. Build the declaration up incrementally, using typedefs:
typedef char *pc; /* pointer to char */
typedef pc fpc(); /* function returning pointer to char */
typedef fpc *pfpc; /* pointer to above */
typedef pfpc fpfpc(); /* function returning... */
typedef fpfpc *pfpfpc; /* pointer to... */
pfpfpc a[N]; /* array of... */

3. Use the cdecl program, which turns English into C and vice versa:
cdecl> declare a as array of pointer to function returning pointer to function returning pointer to char char *(*(*a[])())()


The pointer-to-function declarations in the examples above have not included parameter type information. When the parameters have complicated types, declarations can *really* get messy.


Q14. What is alloca()?

ANS: It allocates and frees memory after use/after getting out of scope


Q15. There was question in c working only on Unix machine with pattern matching.


Q16. In the above question an array of pointers is declared. Write the statement to initialize the 3rd element of the 2 element to 10;


Q17. A structure pointer is defined of the type time. With 3 fields min, sec hours having pointers to intergers. Write the way to initialize the 2nd element to 10.


  
   






FreshersLive - No.1 Job site in India. Here you can find latest 2016 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail.

closepop
closepop