Join Our Email Alerts-Subscribe
Important Note:Login & Check Your Email Inbox and Activate Confirmation Link


Enter Your Email :

Software Companies Placement Papers-Essar-Free Download

16. The length of a rectangle is halved, while its breadth is tripled. What is the percentage change in area?

A. 25% increase B. 50% increase C. 50% decrease D. 75% decrease

Ans. B

Solution:

Let original length = x and original breadth = y. Original area = xy. New length =x/2 New breadth = 3y. New area=[(x/2)*3y]=(3/2)xy Increase % =[(1/2)xy*(1/xy)*100]%=50%

17. The difference between the length and breadth of a rectangle is 23 m. If its perimeter is 206 m, then its area is:

A. 1520 m2 B. 2420 m2 C. 2480 m2 D. 2520 m2

Ans. D

Solution:

We have: (l – b) = 23 and 2(l + b) = 206 or (l + b) = 103. Solving the two equations, we get: l = 63 and b = 40. Area = (l x b) = (63 x 40) m2 = 2520 m2.

18. In a certain school, 20% of students are below 8 years of age. The number of students above 8 years of age is 2/3 of the number of students of 8 years age which is 48. What is the total number of students in the school?

A. 72 B. 80 C. 120 D. 100

Ans. D

19. Point out the error in the program?

#include

int main()

{

struct emp

{

char name[20];

float sal;

};

struct emp e[10];

int i;

for(i=0; i<=9; i++)

scanf(“%s %f”, e[i].name, &e[i].sal);

return 0;

}

A. Error: invalid structure member

B. Error: Floating point formats not linked

C. No error

D. None of above

Ans. B

Solution:

At run time it will show an error then program will be terminated. Sample output: Turbo C (Windwos) Sample 12.123 scanf : floating point formats not linked Abnormal program termination

20. Point out the error in the program?

#include

int main()

{

struct emp

{

char name[20];

float sal;

};

struct emp e[10];

int i;

for(i=0; i<=9; i++)

scanf(“%s %f”, e[i].name, &e[i].sal);

return 0;

}

A. Error: invalid structure member

B. Error: Floating point formats not linked

C. No error

D. None of above

Ans. B

Solution:

At run time it will show an error then program will be terminated. Sample output: Turbo C (Windwos) c:>myprogram Sample 12.123 scanf : floating point formats not linked Abnormal program termination

21. What will be the output of the program?

#include

int main()

{

char p[] = “%dn”;

p[1] = ‘c’;

printf(p, 65);

return 0;

}

A. A

B. a

C. c

D. 65

Ans. A

Solution:

Step 1: char p[] = “%dn”; The variable p is declared as an array of characters and initialized with string “%d” Step 2: p[1] = ‘c’; Here, we overwrite the second element of array p by ‘c’. So array p becomes “%c”. Step 3: printf(p, 65); becomes printf(“%c”, 65); Therefore it prints the ASCII value of 65. The output is ‘A’.

22. What will be the output of the program?

#include

#include

int main()

{

char str1[20] = “Hello”, str2[20] = ” World”;

printf(“%sn”, strcpy(str2, strcat(str1, str2)));

return 0;

}

A. Hello

B. World

C. Hello World

D. WorldHello

Ans. C

Solution:

Step 1: char str1[20] = “Hello”, str2[20] = ” World”; The variable str1and str2 is declared as an array of characters and initialized with value “Hello” and ” World” respectively. Step 2: printf(“%sn”, strcpy(str2, strcat(str1, str2))); => strcat(str1, str2)) it append the string str2 to str1. The result will be stored in str1. Therefore str1 contains “Hello World”. => strcpy(str2, “Hello World”) it copies the “Hello World” to the variablestr2. Hence it prints “Hello World”.

23. Point out the error in the program

#include

int main()

{

int i;

#if A

printf(“Enter any number:”);

scanf(“%d”, &i);

#elif B

printf(“The number is odd”);

return 0;

}

A. Error: unexpected end of file because there is no matching #endif

B. The number is odd

C. Garbage values

D. None of above

Ans. A

Solution:

The conditional macro #if must have an #endif. In this program there is no#endif statement written.

24. Point out the error in the program

#include

#define SI(p, n, r) float si; si=p*n*r/100;

int main()

{

float p=2500, r=3.5;

int n=3;

SI(p, n, r);

SI(1500, 2, 2.5);

return 0;

}

A. 26250.00 7500.00

B. Nothing will print

C. Error: Multiple declaration of si

D. Garbage values

Ans. C

Solution:

The macro #define SI(p, n, r) float si; si=p*n*r/100; contains the error. To remove this error, we have to modify this macro to #define SI(p,n,r) p*n*r/100

25. What will be the output of the program?

#include

int main()

{

float d=2.25;

printf(“%e,”, d);

printf(“%f,”, d);

printf(“%g,”, d);

printf(“%lf”, d);

return 0;

}

A. 2.2, 2.50, 2.50, 2.5

B. 2.2e, 2.25f, 2.00, 2.25

C. 2.250000e+000, 2.250000, 2.25, 2.250000

D. error

Ans. C

Solution:

printf(“%e,”, d); Here ‘%e’ specifies the “Scientific Notation” format. So, it prints the 2.25 as 2.250000e+000. printf(“%f,”, d); Here ‘%f’ specifies the “Decimal Floating Point” format. So, it prints the 2.25 as 2.250000. printf(“%g,”, d); Here ‘%g’ “Use the shorter of %e or %f”. So, it prints the 2.25 as 2.25. printf(“%lf,”, d); Here ‘%lf’ specifies the “Long Double” format. So, it prints the 2.25 as 2.250000.

26. What will be the output of the program?

#include

#include

int main()

{

float n=1.54;

printf(“%f, %fn”, ceil(n), floor(n));

return 0;

}

A. 2.000000, 1.000000

B. 1.500000, 1.500000

C. 1.550000, 2.000000

D. 1.000000, 2.000000

Ans. A

Solution:

ceil(x) round up the given value. It finds the smallest integer not < x. floor(x) round down the given value. It finds the smallest integer not > x. printf(“%f, %fn”, ceil(n), floor(n)); In this line ceil(1.54) round up the 1.54 to 2 and floor(1.54) round down the 1.54 to 1. In the printf(“%f, %fn”, ceil(n), floor(n)); statement, the format specifier “%f %f” tells output to be float value. Hence it prints 2.000000 and 1.000000.

27. What will be the output of the program?

#include

int main()

{

float a=0.7;

if(a < 0.7f)

printf(“Cn”);

else

printf(“C++n”);

return 0;

}

A. C

B. C++

C. Compiler error

D. Non of above

Ans. B

Solution:

if(a < 0.7f) here a is a float variable and 0.7f is a float constant. The float variable a is not less than 0.7f float constant. But both are equal. Hence the ifcondition is failed and it goes to else it prints ‘C++’

28. What will be the output of the program?

#include

int main()

{

float f=43.20;

printf(“%e, “, f);

printf(“%f, “, f);

printf(“%g”, f);

return 0;

}

A. 4.320000e+01, 43.200001, 43.2

B. 4.3, 43.22, 43.21

C. 4.3e, 43.20f, 43.00

D. Error

Ans. A

Solution:

printf(“%e, “, f); Here ‘%e’ specifies the “Scientific Notation” format. So, it prints the 43.20 as 4.320000e+01. printf(“%f, “, f); Here ‘%f’ specifies the “Decimal Floating Point” format. So, it prints the 43.20 as 43.200001. printf(“%g, “, f); Here ‘%g’ “Use the shorter of %e or %f”. So, it prints the 43.20 as 43.2.

29. If the size of an integer is 4 bytes, What will be the output of the program?

#include

#include

int main()

{

printf(“%dn”, strlen(“123456”));

return 0;

}

A. 6

B. 12

C. 7

D. 2 Ans. A

Solution:

The function strlen returns the number of characters int the given string. Therefore, strlen(“123456”) contains 6 characters. The output of the program is “6”.

30. What will be the output of the program?

#include

int main()

{

int arr[5], i=0;

while(i<5)

arr[i]=++i;

for(i=0; i<5; i++)

printf(“%d, “, arr[i]);

return 0;

}



A. 1, 2, 3, 4, 5,

B. Garbage value, 1, 2, 3, 4,

C. 0, 1, 2, 3, 4,

D. 2, 3, 4, 5, 6,

Ans. B

Solution:

Since C is a compiler dependent language, it may give different outputs at different platforms. We have given the TurboC Compiler (Windows) output. Please try the above programs in Windows (Turbo-C Compiler) and Linux (GCC Compiler), you will understand the difference better.

Source: Contents are provided by Technicalsymposium Google Group Members.
Disclaimer: All the above contents are provided by technicalsymposium.com Google Group members.
Further, this content is not intended to be used for commercial purpose. Technicalsymposium.com is not liable/responsible for any copyright issues.

Get All Placement Papers & Tech Round and Aptitude Materials in Our Website




Aptitude

All Aptitude Test Topics with Answers-Complete Details & Free Download

Placement Papers

All Companies Placement Papers with Answers - Free Download of Materials

Technical Round Interview

All Companies Technical Round Interview Asked Questions with Answers

Government Jobs

All State and Central Government Jobs/Railway & Bank Jobs/Alll Competitive Exams-Complete Details.

Software Jobs

Entry Level Software & IT Jobs in Chennai/Bangalore & Leading Metro Cities-Complete Details.

Conference/Symposium

Engineering Colleges & University /Premier Institute (IIT/IIM/etc.,) Events Details.

Off-Campus/Walk-in

All Software Companies & Core Companies Off-Campus Interviews & Walk-in across India-Complete Details.

All Bank Jobs

All Government Bank & Private Bank Jobs-Complete Details.

Internships

All Companies Internships-Complete Details.

IBPS

Probationary Officers/Clerk and Management Trainees & All IBPS Exams/Syllabus-Complete Details.

GATE

All Branches Syllabus & Question Papers-Free Download.

IES-Exam

Indian Engineering Services Syllabus & Question.Papers-Complete Details.

Software Program

Top Programming Source Codes/Lab Manuals with Solutions-Complete Details

Anna University

B.E/B.Tech/M.E/M.Tech/MCA/MBA Latest Syllabus & Question Papers

Scholarships

All Central & State Govt Scholarships/ International Scholarships/Merit Scholarships Details.

Placement Papers

All Companies Placement Papers with Answers - Free Download of Materials

Aptitude

All Aptitude Test Topics with Answers-Complete Details & Free Download

Technical Round Interview

All Companies Technical Round Interview Asked Questions with Answers

Certifications

All Certifications Software & All Branches Certifications-Complete Details.

Group Discussion

Group Discussion Various Topics with Valid Points-Complete Details.

HR Round

All HR Round Questions and Answers/Tips & Do's and Don'ts of HR Round.

General Job

Job Interview Tips & Do's/Dont's/Dress Codes/Body Language-Complete Details.

Placement ebooks

All Companies Placement Materials with Answers-Complete Details.

Technical Round Tips

All Kind of Technical Round Interview Tips and Answers/ Do's and Don'ts

Resume

Resume Writing Tips/Do's & Don'ts-Complete Details.

Career Pages

All MNC Companies Career Pages & Current Openings-Complete Details.

Software Projects

All Software Projects with Source Codes-Free Download & Details.

GRE

GRE Exam Procedure and Complete Details.

TOEFL

TOEFL Exam Procedure and Complete Details.

IELTS

IELTS Exam Procedure and Complete Details

SAT

SAT Exam Procedure and Complete Details

GMAT

GMAT Exam Procedure and Complete Details

MS in USA

MS in USA Procedure and Complete Details

Civil Engineering

Civil Engineering Lecture Notes for All Universities & Lab Manuals for All Semester.-Free Download

Mechanical Engineering

Mechanical Engineering Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Automobile Engineering

Automobile Engineering Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Computer Science

Computer Science Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Information Technology

Information Technology Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

MBA

MBA Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Biotechnology

Biotechnology Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Biomedical

Biomedical Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Aeronautical Engineering

Aeronautical Engineering Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download

Chemical Engineering

Chemical Engineering Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Electronics & Communication

Electronics & Communication Engineering Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Electrical & Electronics

Electrical & Electronics Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

MCA

MCA Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

B.Sc

B.Sc All Branches (Maths/Physics/Computer Science/Electronics/etc.,)-Lecture Notes-Free Download

BCA

BCA Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

BBA

BBA Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

M.Sc

M.Sc All Branches (Maths/Physics/Computer Science/Electronics/etc.,)-Lecture Notes-Free Download

M.Com

M.Com Lecture Notes for All Universities & Lab Manuals for All Semester-Free Download.

Engineering Maths

All Semester Engineering Maths (M1/M2/M3/M4/etc.,) Lecture Notes-Free Download

Engineering EBooks

All Engineering Branches of ebooks Free Download-Complete Details.

Engineering Physics

All Semester Engineering Physics Lecture Notes-Free Download

GATE Preparation Books

All Branches of GATE Free Preparation eBooks-Free Download.

Engineering Chemistry

All Semester Engineering Chemistry Lecture Notes-Free Download

Software Companies Info

All Software Companies in India - Complete Details.

Admission

Foreign Universities All Course Admission Procedures-Complete Details.

Software Ebooks

All Programming Software free Eboooks-Free Download.

Web Hosting

All Web Hosting Procedure-Complete Details.