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

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