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

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