PuzzlersWorld.com

  • Hacker Puzzle
  • Interview Puzzles
  • Number Puzzles
  • Maths Puzzles

Objective Questions set C/C++ – Part 6

(1 votes, average: 1.00 out of 5)

December 23, 2012 by puzzler Leave a Comment

11 Objective type interview questions on C/C++ with answers – Part 6

Before you start:-

  1. You can check your answer by filling a,b,c,d or e in the text box.
  2. You can get the answer by clicking Give Up Button.

Give your best shot before giving up 🙂

Q1) Max value of SIGNED int?
a. 2^31
b. 2^31 -1
c. 2^32
d. 2^32 -1

Tried enough already?

Q2) What does extern means in a function declaration?


a. the funct has global scope
b. the funct need not be defined
c. nothing really
d. the funct has local scope only to the file it is defined in
e. none of the above
Tried enough already?

Q3) When does a stack member will be initialized?
a. when object is created
b. when object is initialised.
c. does not depend on object.
d. none.

Tried enough already?

Q4) What will it print?

 int i=5
 printf("%f",i);

a. 5.000000
b. 0.000000
c. 5
d. 0

Tried enough already?

Q5) What’s wrong with the program?

struct s{
  char a;
  int t;
 }
 /* comment */
 main()
 {int x=3;
  return;}

a. main is not returning int
b. main is not returning struct
c. main is is not marked public
d. no name is given to struct.

Tried enough already?
Q6) Which operator cannot be overloaded in C++ ?
a. +
b. ++
c. *
d. .
Tried enough already?
Q7) What is the size of the stack ?

fact(int x)
 {
  int n;
  n=x;
  return fact(x-1);
 }

a. infinity
b. n
c. n*(n-1)
d. depends on compiler and processor used.

Tried enough already?
Q8) global variable conflicts due to multiple file occurrence is resolved during
a. compile-time
b. run-time
c. link-time
d. load-time
Tried enough already?
Q9) What is true for volatile?
a. code for each assignment of a volatile variable must be generated even if it appears to have no effect
b.a variable cannot be both constant and volatile
c.volatile type specifier can be used alone
d.volatile type specifier can be used to provide reliable access to specified memory location
Tried enough already?

Q10) What will be the value of a & b after the execution of below program?

int a=5,b=6
swap(&a,b);

This function is written to swap a and b
find value of a and b.
a. 5,6
b. 6,5
c. 5,5
d. 6,6

Tried enough already?

Q11) In C which parameter passing technique is used?
a. call by value,
b. call by reference,
c. both

Tried enough already?
  • Share on Whatsapp
  • Share on Facebook
  • Share on Twitter
Facebook Comments
Next Puzzle
Basic Concepts C/C++

Checkout more Interview Questions Tags: C/C++, Interview, Solved Puzzles

Leave a Comment Cancel reply

Submit your Puzzle

You may also like

  • Bullseye Solution: Google codejam 2013 Round 1A
  • Find the Min solution: Facebook hacker Cup 2013 Qual Round
  • Cookie Clicker Alpha Solution – Google Code Jam 2014
  • Deceitful War Solution – Google Code Jam 2014
  • Card Game solution: Facebook hacker cup 2013 Round1
  • implement isPalindrome(int n)
  • Tic-Tac-Toe-Tomek Solution: Google codejam 2013 Qual Round
  • Find middle element of linked list
  • Fair and Square Solution: Google codejam 2013 Qual Round
  • Consonants Solution: Google codejam 2013 Round 1C

Categories

  • Aive hi Puzzles
  • Akbar and Birbal
  • Alphabetical Puzzles
  • Bollywood Puzzles
  • Google Code jam
  • Hindi Riddles
  • Interview Puzzles
  • Interview Questions
  • Logical Puzzles
  • Malayalam Puzzles
  • Maths Puzzles
  • Miscellaneous
  • Number Puzzles
  • Picture Puzzles
  • Riddles
  • Tamil Puzzles
  • Technical

Social

  • View puzzlersworld’s profile on Twitter
privacy policy

Copyright © 2025 · eleven40 Pro Theme on Genesis Framework · WordPress · Log in

  • Hacker Puzzle
  • Logo Puzzles
  • Optical Illusions
  • WhatsApp Puzzles
  • Picture Puzzles
  • Riddles
    â–¼
    • Hindi Riddles
  • Bollywood Puzzles
  • Alphabetical Puzzles
  • Aive hi Puzzles
  • Interview Puzzles
  • Logical Puzzles
  • Interview Questions
    â–²
    • Data Structures
    • Binary Tree
    • Algorithms
    • Recursion Questions
    • Amazon Interview Questions
    • Snapdeal Interview Questions
    • Google Code jam
  • Technical
  • Akbar and Birbal
  • Number Puzzles
  • Maths Puzzles
  • Miscellaneous