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

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