aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Programming Fundamentals
  • You are programming to check if the age is greater than 1...
Multiple choice

You are programming to check if the age is greater than 18 identify the correct statement.

  1. if (age > "17")

  2. if (age > 17)

  3. if (age < 17)

  4. if ("age" > "17")

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Option B is the correct syntax for comparing an integer variable to a numeric value.

Keep practicing — related questions

  • age = 16 and fave = "blue" which of the following statement is true?
  • Suppose “AGE” is the field name and you want to get the value of age between 10 and 20, which of the follow...
  • Each problem consists of three statements. Based on the first two statements, the third statement may be tr...
  • Which of the following statements is/are correct about Mississippian period? 1. It was the Carboniferous pe...
  • Consider the following statements: 1. Saw dust is a bad conductor of heat. 2. Water at 0o C feels colder th...
  • Consider the following statements: 1. Highly polished surfaces are bad absorbers of heat. 2. Heat helps in ...
  • Consider the following statements: 1. Calorimeter an apparatus is used for measuring heat energy. 2. Human ...
  • Which of the following statements is the correct output statement in C++?
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy