Categories
Political Science Mathematics General Pharmacy Basic Electrical Engineering Effective Business Communication American (United States) History Digital electronics Communication Skills Computer Architecture Economics Geochemistry Computer science Managerial Economics The Physics of Everyday Life Agronomy Management Fundamentals of Operating Systems History Psycology & Sociology Business Management Pharmacy Boilers and Welding Behavioural Science Botony Developmental Psychology Social Psychology Law Engineering Analytical Chemistry Physics Statistics for Psychologists Introduction to the Science and Engg Economic Theory Fundamentals of Information Technology Biology & Chemistry On Docsity Applied Physics Computer Programming Engineering Physics Psychology Aerospace Engineering Computer Graphics and Animation Advanced Computer Architecture Admission tests Chemistry Biostatistics College Physics A Software Engineering Job and Internships Computer Fundamentals Statistics and Economics Languages Management Information Systems Consumer Behaviour Law of Torts Pyhsics and AstroPhysics Soil Mechanics and Foundations Sociology United States Philosophy Literature and Communication English Grammar Electronics and Communication Network Technologies and TCP/IP Information System Analysis and Design Microeconomics Financial Management Engineering Materials History & Philosophy Operating System Business System Advanced Physics Biology Fuzzy Intelligence Business Administration Civil procedure Accounting Biochemistry Java Programming Methods in Psychology Data Communication and Computer Networks Security Analysis Statistics Finance Biological Systems Object Oriented Programming Questions on universities Criminal Law Human Resource Management Introduction to Business Generic Project Management Internet and Java Programming Medicine and Pharma Political sciences Business Law Professional Communication for Pharmacists

What is the reserve word and standard identifier in C plus plus?

0 votes

November 7th, 2012 12:17
in Computer Programming by parameshwari (Ankit Institute of Technology and Science, Computer sciences)

What is the reserve word and standard identifier in C plus plus?

"Hi, I want a solution

What is wrong with this code:if (x < y < z) cout << x << "" < "" << y << "" < "" << z << endl;"

1 Answers
0 votes

November 12th, 2012 07:29
danmarino (Ohio State University (OH), Physics)
"The programmer probably intended to test the condition (x < y andand y < z). The code as written will compile and run, but not as intended. For example, if the prior values of x, y, and z are 44, 66, and 22, respectively, then the algebraic condition “x < y < z” is false. But as written, the code will be evaluated from left to right, as (x < y) < z. First the condition x < y will be evaluated as “true.” But this has the numeric value 1, so the expression (x < y) is evaluated to 1. Then the combined expression (x < y) < z is evaluated as (1) < 66 which is also true. So the output state-ment will execute, erroneously reporting that 44 < 66 < 22."

Please log in or register to add a comment.

Related questions
6 Answers
Answer
parama (Deenbandhu Chhotu Ram University of Science and Technology, Computer sciences)
6 Answers
Answer
parama (Deenbandhu Chhotu Ram University of Science and Technology, Computer sciences)
6 Answers
Answer
gannak (National Institute of Industrial Engineering, electrical enginnering)
2 Answers
Answer
pararijka (Ankit Institute of Technology and Science, Computer sciences)
Subjects