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

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