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

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