Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
C++/ Java Interview Questions - Calsoft
Topics
>>
Placement papers
>>
Calsoft placement papers, interview experience, exam pattern
-01/03/12
« Previous
Next »
1. What is the output of the following program?
#include
main()
{
extern int a;
cout<
}
int a=20;
(a) 20 (b) 0 (c) Garbage value (d) error
2. What is the output of the following program?
main()
{
int a[5]={2,3};
cout<
}
(a) Garbage value (b) 2 3 3 (c) 3 2 2 (d) 0 0 0
3. What is the output of the following program?
main()
{
inti=-3,j=2,k=0,m;
m=++i&&++j||++k;
cout<
}
(a) -2 3 0 1 (b) -3 2 0 1 (c) -2 3 1 1 (d) error
4. What is the output of the following program?
main()
{
int a,b;
a=sumdig(123);
b=sumdig(123);
cout<
}
sumdig(int n)
{
static int s=0;
int d;
if(n!=0)
{
d=n%10;
n=(n-d)/10;
s=s+d;
sumdig(n);
}
else return(s);
}
(a) 12 6 (b) 6 12 (c) 3 15 (d) error
5. What is the output of the following program?
#define CUBE(x) (x*x*x)
main()
{
int a,b=3;
a=CUBE(b++);
cout<
}
(a) 64 4 (b) 27 4 (c) 27 6 (d) 64 6
« Previous
Next »
Post your comment
Discussion
RE: C++/ Java Interview Questions - Calsoft -Interview Questions (02/03/12)
Hibernate interview questions and answers
Spring interview questions and answers
C++ interview questions and answers
C interview questions and answers
Java interview questions and answers
Cloud Computing interview questions and answers
Networking interview questions and answers
Testing interview questions and answers
PHP interview questions and answers
Related Content
Calsoft Placement Paper - Selection Process and Test Pattern
Calsoft placement question paper for aptitude
HR Interview Questions - Calsoft
SQL Server Interview Questions - Calsoft
.Net Interview Questions - Calsoft
C++/ Java Interview Questions - Calsoft
Follow us
CareerRide on YOUTUBE
CareerRide on INSTAGRAM
MCQs
English
Tutorials
Download
Related Topics
BPL placement papers, interview experience, exam pattern
Persistent placement papers, interview experience, exam pattern
VeriFone placement papers, interview experience, exam pattern
CSC placement papers, interview experience, exam pattern
SAP MaxDB placement test question papers
Integra placement papers, interview experience, exam pattern
▲