Expresii C++

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Cucuiet
C
Cucuiet
Community Contributor
Quizzes Created: 2 | Total Attempts: 2,903
| Attempts: 1,717 | Questions: 9
Please wait...
Question 1 / 9
0 %
0/100
Score 0/100
1. Dacă a, b, c, d sunt variabile de tip int, ce valoare are expresia :E = a/b/c – d,  dacăa=36, b=6, c=6, d=4?

Explanation

The given expression calculates the value of E by first dividing a by b, then dividing the result by c, and finally subtracting d from it. In this case, a=36, b=6, c=6, and d=4. So, the expression evaluates to (36/6/6) - 4 = 1 - 4 = -3. Therefore, the value of E is -3.

Submit
Please wait...
About This Quiz
Expresii C++ - Quiz

Clasa a X-a Informatica

Personalize your quiz and earn a certificate with your name on it!
2. Care este rezultatul evaluarii expresiei de mai jos?10 * 2 / 3 * 3 / 2*5

Explanation

The expression can be simplified using the order of operations (PEMDAS/BODMAS). First, we perform the multiplication and division from left to right. 10 * 2 = 20, 20 / 3 = 6.6667, 6.6667 * 3 = 20, and 20 / 2 = 10. Then, we perform the remaining multiplication from left to right. 10 * 5 = 50. Therefore, the result of the expression is 50.

Submit
3.  Care din următoarele expresii au valoarea 1 :(alegeti 2 variante)
 

Explanation

The correct answer is "(3

Submit
4.  Considerăm că variabila a are valoarea  –13. Cărui tip poate aparţine această variabilă:
 

Explanation

The variable "a" can be of type "long" because it can store negative values, such as -13, and "long" is capable of storing larger ranges of numbers, including negative values.

Submit
5. Care este valoarea expresiei  alăturate?ABS(-11.2) + SQRT(TRUNC(16.23))

Explanation

not-available-via-ai

Submit
6.  Care din următoarele expresii furnizează rezultatul 1 dacă a şi b sunt ambele pozitive:
 

Explanation

The expression (a*b > 0) && (b > 0) will provide the result 1 if both a and b are positive. This is because the first part of the expression, (a*b > 0), checks if the product of a and b is greater than 0, which means both numbers have the same sign (either both positive or both negative). The second part of the expression, (b > 0), checks if b is also positive. Therefore, this expression ensures that both a and b are positive, resulting in the answer 1.

Submit
7. Indicați expresia care are valoarea 1 dacă și numai dacă numărul natural memorat în variabila întreagă x are exact două cifre. 

Explanation

The expression "x>9 && x" has a value of 1 if and only if the natural number stored in the integer variable x has exactly two digits. This is because the expression "x>9" checks if x is greater than 9, which ensures that x has at least two digits. The "&&" operator then checks if x is also less than 100, ensuring that x has exactly two digits and not more. Therefore, the expression "x>9 && x" evaluates to true only when x has exactly two digits.

Submit
8. Care dintre următoarele expresii  are valoarea 1 dacă şi numai dacă numărul real memorat în variabila x se află în intervalul (-2,2)?  

Explanation

The expression "4-x*x>0" has a value of 1 if and only if the real number stored in variable x is within the interval (-2,2). This expression represents the condition that the square of x subtracted from 4 is greater than 0, which means that x must be either less than -2 or greater than 2 in order for the expression to be true. Therefore, if x is within the interval (-2,2), the expression will be false and have a value of 0.

Submit
9. Stabiliti cae dintre expresiile urmatoare atribuie variabilei reale m valoarea mediei aritmetice anumerelor intregi x si y?

Explanation

The correct answer is m=(x+y)/2.0. This expression assigns the variable m the value of the arithmetic mean of the integers x and y. The use of the decimal point after the 2 ensures that the division is done as a floating-point operation, resulting in a more precise average value.

Submit
View My Results

Quiz Review Timeline (Updated): Jul 22, 2024 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Jul 22, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Oct 30, 2014
    Quiz Created by
    Cucuiet
Cancel
  • All
    All (9)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Dacă a, b, c, d sunt variabile de tip int, ce valoare are expresia :E...
Care este rezultatul evaluarii expresiei de mai jos?10 * 2 / 3 * 3 /...
 Care din următoarele expresii au valoarea 1 :(alegeti 2...
 Considerăm că variabila a are valoarea  –13. Cărui...
Care este valoarea expresiei  alăturate?ABS(-11.2) +...
 Care din următoarele expresii furnizează rezultatul 1 dacă a...
Indicați expresia care are valoarea 1 dacă și numai dacă numărul...
Care dintre următoarele expresii  are valoarea 1 dacă şi numai...
Stabiliti cae dintre expresiile urmatoare atribuie variabilei reale m...
Alert!

Advertisement