All India Exams
Home AptitudeBankEngineeringEnglishGKInterviewOnline TestPlacement PapersReasoning
  • Home
  • Aptitude
  • Bank
  • Engineering
  • English
  • GK
  • Interview
  • Online Test
  • Placement Papers
  • Reasoning

Constants C++ Questions And Answers

Here you can find Constants C++ Questions and Answers.

Why Constants C++ Questions and Answers Required?

In this Constants C++ Questions and Answers section you can learn and practice Constants C++ Questions and Answers to improve your skills in order to face technical inerview conducted by Banks. By Practicing these interview questions, you can easily crack any Bank Exams interview.

Where can I get Constants C++ Questions and Answers?

AllIndiaExams provides you lots Constants C++ Questions and Answers with proper explanation. Fully solved examples with detailed answer description. All students, freshers can download Constants C++ Questions and Answers as PDF files and eBooks.

How to solve these Constants C++ Questions and Answers?

You no need to worry, we have given lots of Constants C++ Questions and Answers and also we have provided lots of FAQ's to quickly answer the questions in the Bank Exams interview.

Constants C++ Questions and Answers

1. The Constants C++ are also called as

Constants C++ Questions and Answers

2. What are the parts of the literal Constants C++?

Constants C++ Questions and Answers

3. How the Constants C++ are declared?

Constants C++ Questions and Answers

4. What is the output of this program? #include using namespace std; int main() { int const p = 5; cout << ++p; return 0; }

Constants C++ Questions and Answers

5. What is the output of this program? #include < iostream > using namespace std; #define PI 3.14159 int main () { float r = 2; float circle; circle = 2 * PI * r; cout << circle; return 0; }

Constants C++ Questions and Answers

6. Which of the following statement is true about preprocessor directives?

Constants C++ Questions and Answers

7. Regarding following statement which of the statements is true? const int a = 100;

Constants C++ Questions and Answers

8. The difference between x and ‘x’ is

Constants C++ Questions and Answers

9. How to declare a wide character in string literal?

Home EngineeringComputer Science & EngineeringC++ Multiple Choice Questions & AnswersConstants

Constants - C++ Questions and Answers

This is the c++ programming questions and answers section on "Constants" with an explanation for various interview, competitive examination and entrance test. Solved examples with detailed answer description, explanation are given and it would be easy to understand.

Constants C++ Questions

Online Test Name Constants
Exam Type Multiple Choice Questions
Category Computer Science Engineering Quiz
Number of Questions 09
1. The constants are also called as
  • A. const
  • B. preprocessor
  • C. literals
  • D. none of the mentioned
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option C

Explanation:

literals

Workspace

Report Error


2. What are the parts of the literal constants?
  • A. integer numerals
  • B. floating-point numerals
  • C. strings and boolean values
  • D. all of the mentioned
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option D

Explanation:

Because these are the types used to declare variables and so these can be declared as constants.

Workspace

Report Error


3. How the constants are declared?
  • A. const keyword
  • B. #define preprocessor
  • C. both a and b
  • D. None of the mentioned
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option C

Explanation:

The const will declare with a specific type values and #define is used to declare user definied constants.

Workspace

Report Error


4.

What is the output of this program?

#include

using namespace std;

int main()

{

int  const  p = 5;

cout << ++p;

return 0;

}

  • A. 5
  • B. 6
  • C. Error
  • D. None of the mentioned
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option C

Explanation:

We cannot modify a constant integer value.

Workspace

Report Error


5.

What is the output of this program?

#include < iostream >

using namespace std;

#define PI 3.14159

int main ()

{

float r = 2;

float circle;

circle = 2 * PI * r;

cout << circle;

return 0;

}


  • A. 12.566
  • B. 13.566
  • C. 10
  • D. compile time error
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option A

Explanation:

In this program, we are finding the area of the circle by using concern formula.

Workspace

Report Error


  • «
  • 1
  • 2
  • »

Related Topics:

  • Functions
  • Input Output Streams
  • Inheritance
  • Macros
  • Interfaces
  • Operators and Statements
  • Namespaces
  • Arrays
  • Templates
  • Pointers

Mock Tests & Online Quizzes

  • Aptitude Online Test

  • Reasoning Online Test

  • GK Online Test

  • English Online Test

  • RRB Mock Test

  • RBI Mock Test

  • Free SBI Mock Test

  • IBPS Mock Test FREE

  • SSC Mock Test

  • CAT Exam Mock Test

  • GATE Mock Test

  • IT Courses Quiz

Questions and Answers

  • Aptitude Questions
  • Verbal Reasoning Questions
  • Non Verbal Reasoning
  • Logical Reasoning Questions
  • Data Sufficiency Questions
  • Data Interpretation
  • eLitmus Sample Papers
  • ECE Questions and Answers
  • EEE Questions and Answers
  • Verbal Ability Questions
  • GK Questions

Programming Quiz

  • C Programming
  • C++ Programming
  • PHP Programming
  • Java Programming
  • Python Programming
  • DataScience MCQ
  • Hadoop MCQ
  • Mongo DB MCQ
  • MySQL MCQ

Interview Questions

  • Java Interview Questions
  • .Net Interview Questions
  • Networking Interview Questions
  • C Language Interview Questions
  • C++ Interview Questions
  • Testing Interview Questions
  • Android Interview Questions
  • HR Interview Questions
  • Group Discussion Topics

Our Sites

AView.in

© by AllIndiaExams.in. All Rights Reserved | Copyright | Terms of Use & Privacy Policy