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



Enter Your Email :

Copyright Disclaimer:
Section 107 of the Copyright Act Fair Use Contents .
We are forwarding content link(s) from our website to content website & We are not serving any contents.
Main Source:Google.com.All the Content PDF link(s) is/are obtained from GoogleSearch
for the purpose of Education & Teaching Intention. Not for commercial purpose.
Technicalsymposium.com is not liable/responsible for any copyright issues.

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.

Placement Papers with Answers PDF- Free Download



Infosys Placement Papers

Amazon Placement Papers

HAL Placement Papers

HCL Placement Papers

Hexaware Placement Papers

Honeywell Placement Papers

HP Placement Papers

HPCL Placement Papers

HSBC Placement Papers

Huawei Placement Papers

ICICI Placement Papers

Fresher Jobs / Projects & Study Notes PDF







Technicalsymposium.com-Contents

Technicalsymposium.com-Contents

Conference & Symposium Details

Government Jobs Details

Off-Campus Interviews & Walk-in/Career Pages

Software Jobs and IT Jobs Details

Bank Jobs & PO/Clerk Jobs Preparation Books PDF

Bank Quick Study Notes & Question Papers PDF

IES Syllabus & Question Papers-Free Download

Placement Papers with Answers PDF

Aptitude Study Notes & Puzzles PDF

Technical Interview Questions with Answers PDF

Technicalsymposium.com-Contents

Technicalsymposium.com-Contents

BE/B.Tech/M.Sc & B.Sc & Commerce Lecture Notes-Free Download

Engineering Maths Lecture Notes-Free Download

GRE Study Materials & Notes-Free Download

TOEFL Study Materials-Free Download.

IELTS Study Materials & ebooks-Free Download

GMAT Study Materials-Free Download

SAT Study Materials & ebooks-Free Download

Engineering Physics Lecture Notes-Free Download

Technicalsymposium.com-Contents

Technicalsymposium.com-Contents

Resume Formats and Resume Writing Tips

Group Discussion Topics & Answers

HR & Situational and Behavioral Interview Questions & Answers

General Job Interviews Materials-Free Download

Engineering Chemistry Lecture Notes-Free Download

Anna University Question Papers and Study Notes PDF

Programming & Manuals and Projects PDF

GATE Question Papers and Study Materials & ebooks PDF

All Engineering ebooks & Study Notes PDF

Paper Abstracts and Conference Papers PDF