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.

Placement Materials & Answers-Free Download


BPL Placement Papers-Free Download

1. void main()

{

int a = 10, b =20;

char x = 1, y = 0;

if(a,b,x,y)

{

printf(“Freshers World”);

}

}

What is the output?

A. res is printed

B. freshers world is printed

C. Compiler Error

D. Nothing is printed

Ans. D

2. What is x in the following program?

#include int main()

{

typedef char (*(*arrfptr[3])())[10];

arrfptr x;

return 0;

}

A. x is a pointer

B. x is an array of three pointer

C. x is an array of three function pointers

D. Error in x declaration

Ans. C

3. main()

{

char throught[2][30] ={ “Don’t walk in front of me..”,’i am not follow”};

printf(“%c%c,*(thought[0]9),*(*(thought 0)5));

}

What is the output of this program ?

A. kk

B. int**array2 = (int**)malloc(nrows*sizeof(int*));Don’t walk in front of me

C. i may not follow

D. k

Ans. D

4. What will be the output of the program ?

#include

int main()

{

int k=1;

printf(“%d == 1 is” “%sn”, k, k==1?”TRUE”:”FALSE”);

return 0;

}

A. k == 1 is TRUE

B. 1 == 1 is TRUE

C. 1 == 1 is FALSE

D. K == 1 is FALSE

Ans. B

5. main()

{

int i=5;

printf(“%d”,i = ++i==6);

}

A. 5

B. 1

C. 6

D. compiler error

Ans. B

6. Which files will get closed through the fclose() in the following program?

#include

int main()

{

FILE *fs, *ft, *fp;

fp = fopen(“A.C”, “r”);

fs = fopen(“B.C”, “r”);

ft = fopen(“C.C”, “r”);

fclose(fp, fs, ft);

return 0;

} A. “A.C” “B.C” “C.C”

B. “B.C” “C.C”

C. “A.C”

D. Error in fclose()

Ans. D

7. void main()

{

printf(“sizeof(void *) = %d n”,sizeof(void*));

printf(“sizeof(int *) = %d n”,sizeof(int*));

printf(“sizeof(double*) = %d n”,sizeof(double*));

printf(“sizeof(struct unknown *) = %d n”,sizeof(struct unknown*));

}

A. no out put

B. compiler error

C. sizeof(void *) = 2 sizeof(int *) = 2 sizeof(double *) = 2 sizeof(struct unknown *) = 2

D. syntax error

Ans. C

8. Which of the following statements are correct about the program below?

#include

int main()

{

int size, i;

scanf(“%d”, &size);

int arr[size];

for(i=1; i<=size; i++)

{

scanf(“%d”, arr[i]);

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

}

return 0;

}

A. The code is erroneous since the subscript for array used in for loop is in the range 1 to size.

B. The code is erroneous since the values of array are getting scanned through the loop.

C. The code is erroneous since the statement declaring array is invalid.

D. The code is correct and runs successfully.

Ans. C

9. # include

char *somefun1()

{

char temp[] =”string”;

return temp;

}

char * somefun2()

{

char temp[] = { ‘s’,’t’,’r’,’i’,’n’,’g’};

return temp;

}

int main()

{

puts (somefun1());

puts(somefun2());

}

A. syntax error

B. some garbage value

C. compiler error

D. no out put

Ans. B

10. What will be the output of the program?

#include

int fun(int(*)());

int main()

{

fun(main);

printf(“Hin”);

return 0;

}

int fun(int (*p)())

{

printf(“Hello “);

return 0;

}

A. Infinite loop

B. Hi

C. Hello Hi

D. Error

Ans. C

11. main()

{

int a = 10,*j;

void *k;

j = k =&a;

j++;

k++;

printf(“n %u %u”,j,k);

}

A. compiler error

B. syntax error

C. memory address

D. noo out put

Ans. A

Solution:

cannot increment a void pointer

12. What will be the output of the program?

#include

int i;

int fun1(int);

int fun2(int);

int main()

{

extern int j;

int i=3;

fun1(i);

printf(“%d,”, i);

fun2(i);

printf(“%d”, i);

return 0;

}

int fun1(int j)

{

printf(“%d,”, ++j);

return 0;

}

int fun2(int i)

{

printf(“%d,”, ++i);

return 0;

}

int j=1;

A. 3, 4, 4, 3

B. 4, 3, 4, 3

C. 3, 3, 4, 4

D. 3, 4, 3, 4

Ans. B

13. main()

{

int i =3;

for(; i ++ = 0;)

printf(“%d”,i);

} A. compiler error

B. syntax error

C. some garbage value

D. no out put

Ans. A

Solution:

Lvalue required in function main

14. Point out the error in the program

#include

int main()

{

int f(int);

int b;

b = f(20);

printf(“%dn”, b);

return 0;

}

int f(int a)

{

a > 20? return(10): return(20);

}

A. Error: Prototype declaration

B. No error

C. Error: return statement cannot be used with conditional operators

D. None of above

Ans. C

Solution:

In a ternary operator, we cannot use the return statement. The ternary operator requires expressions but not code.

15. What will be output of following c program?

#define max

int main()

{

printf(“%d”,max);

return 0;

}

A. 0

B. null

C. Garbage

D. Compilation error

Ans. D

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.



Download-Placement Paprs & Answers PDF


Free Placement Study Notes PDF-Download



Technicalsymposium.com- Fresher Jobs & All Study Notes-Free Download










Technicalsymposium.com-Free Live Support-Chat with Our Experts

Official Contact: +91-9245556793 (Whatsapp Message / SMS / Voice Call)


Our Expert team is ready to answer all your questions immediately-Feel free to speak in Tamil/English.

(Example:Events info/Lecture Notes/Off-Campus & All Jobs/Projects & All education information)

Working hrs (IST): (Morning: 10:00AM-3:00 PM) and (Evening:5:00 PM to 10:00 PM)

All Latest Question & Answer Page (FAQ)-Click here