• info@avatto.com

  • +91-9920808017

    Follow Us :
  • Login / Register
Avatto
  • ABOUT EXAMS
    • UGC NET Exam
    • Commerce Exams
    • GATE Exams
    • About CTET
    • NATA
    • ACET

Object Oriented Programming - Find Output

Avatto > > UGC NET COMPUTER SCIENCE > > PRACTICE QUESTIONS > > Programming Languages and Computer Graphics > > Object Oriented Programming > > Find Output

11. The following program
void abc (int &p)
{
cout  << p ;
}
void main (void)
{
float m = 1.23;
abc (m) ;
cout << m;
}    

  • A

    results in compilation error

    right wrong
  • B

    results in run time error

    right wrong
  • C

    prints 1. 23

    wrong right
  • D

    prints I

    right wrong
  • Answer
  • Comment
    •   
    Array
  • Option : A
  • Explanation :
Cancel reply

You must be logged in to post a comment.

Cancel reply

You must be logged in to post a comment.

12. What is the output of the following c++ program?
void abc (int x = 0, int y = 0)
{
cout << "Hi There";
}
void abc (int x)
{
cout  << "How are you doing today ? " ;
}
void main (void)
(
int m = 5;
abc (m) ;
}    

  • A

    Hi There

    right wrong
  • B

    How R U doing today?

    right wrong
  • C

    What gets printed depends on how the particular compiler is implemented

    wrong right
  • D

    It results in compilation error

    right wrong
  • Answer
  • Comment
    •   
    Array
  • Option : D
  • Explanation : The call abc ( ) matches with the signatures - void abc (int x = 0, int y = 0) and void abc (int x). The compiler cannot unambiguously resolve this conflict. So it complains.
Cancel reply

You must be logged in to post a comment.

Cancel reply

You must be logged in to post a comment.

Page 3 of 3«123
ads
  • Computer System Architecture
  • Theory of Computation and Compilers
  • Data Communication and Computer Networks
  • Database
  • Data Structures and Algorithms
  • System Software and Operating System
  • Software Engineering
  • Discrete Mathematics
  • Programming Languages and Computer Graphics
      • Computer Graphics
      • Programming in C
      • Object Oriented Programming
        • Basics Of C++
        • Classes
        • Constructor Destructor
        • Find Output
        • Functions
        • Operator Overloading
        • Pointers
        • Inheritance
        • Inheritance In Object Oriented Programming
      • Web Technology
    • Artificial Intelligence
    • Soft Computing
    Related Quiz.
    Find Output

    Login with Facebook

    Login with Google

    About
    • About Us
    • Contact Us
    CATEGORIES
    • ACET
    • CS Foundation
    • Data Science
    • Deep Learning
    • CMAI Foundation
    • Machine Learning
    Terms
    • Privacy Policy
    • Return Policy
    • Disclaimer
    • Feedback

    Copyright © 2026 ™ is a registered trademark

    • Sign in
    • New account

    Forgot your password?

    Lost your password? Please enter your email address. You will receive mail with link to set new password.

    Back to login