Question: Q 1 . a . Define operator precedence and operator associativity. b . What is a ternary operator? What is a prefix operator? c .

Q1.
a. Define operator precedence and operator associativity.
b. What is a ternary operator? What is a prefix operator?
c. What is a coercion?
d. In JavaScript, what is the difference between == and ===?
e. What is a mixed-mode expression?
f. What is short-circuit evaluation?
Q2. Let the function fun be defined as
int fun (int ?**k){
+k+=4;
return 3+(+k)-1;
}
Suppose fun is used in a program as follows:
void main (){
int i=10,j=10, sum1, sum2;
sum1=(i2)+fun(&i);
??2=fun(j)+(j2);
}
What are the values of sum 1 and sum 2
operands in the expressions are evaluated left to right?
operands in the expressions are evaluated right to left?
Q3.
a. Determine whether the narrowing explicit type conversions in two languages you know provide
error messages when a converted value loses its usefulness.
b. What is a pretest loop statement? What is a posttest loop statement?
c. What is unusual about Python's design of compound statements?
d. What does the range function in Python do?
Q4. Rewrite the following pseudocode segment using a loop structure in the
specified languages:
k=j+1327
loop:
if k>10 then goto out
k=k+1
i=3+k-1
goto loop
out: ...
C,C++, Java, or C#
Python
Assume all variables are integer type. Discuss which language, for this code, has the best writability, the
best readability, and the best combination of the two.
 Q1. a. Define operator precedence and operator associativity. b. What is

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!