What will be values for $a$ and $c$ after execution of the following code if $a$ is $10$, $b$ is $5$, and $c$ is $10$?
if ((a > b) && (a <= c))
a = a + 1;
else
c = c + 1;
A (run time only) is false; arrays in many languages (like C static arrays) are allocated at compile time.
C is false because an array is a linear data structure (though it stores homogeneous types).
Hence the correct statement is compile-time allocation.
In C programming, the mode 'a' in the fopen() function is used to open a file in append mode,
which allows new data to be added to the end of the file without deleting existing content.
Pattern alternates between swap of 1st & 3rd letters and then +1 shift of both ends; the middle stays $A$.
FAG $\xrightarrow{\text{swap}}$ GAF $\xrightarrow{+1}$ HAI $\xrightarrow{\text{swap}}$ IAH $\xrightarrow{+1}$ JAI.
A man walks $5,\text{km}$ south, turns right and walks $3,\text{km}$, then turns left and walks $5,\text{km}$. In which direction is he from the starting place?
Symmetric: $(1,2)\in R$ but $(2,1)\notin R\Rightarrow$ not symmetric.
Transitive: check the only nontrivial chain: $(1,2)$ and $(2,3)\Rightarrow (1,3)$, which is in $R$.
Pairs with $(x,x)$ keep the second pair; $(1,3)$ can only compose with $(3,3)$ giving $(1,3)$; $(2,3)$ with $(3,3)$ gives $(2,3)$. All required compositions are in $R$.
$\boxed{\text{$R$ is reflexive and transitive, but not symmetric.}}$
Not reflexive (missing $(1,1),(2,2),(3,3)$). Not symmetric (since $(2,1)\notin R$). Transitive holds vacuously because there is no pair starting at $2$ to trigger $(1,2)$∘$(2,\cdot)$.
A, C, and D are bijections (permutations), hence invertible. In B, both $2$ and $3$ map to $1$ (not one-to-one), so not bijective $\Rightarrow$ no inverse.
$f(x) = \dfrac{1}{x}$ is not defined for $x = 0$, hence it’s not a function from $\mathbb{R} \to \mathbb{R}$.
If domain were $\mathbb{R} - {0}$, then it would be bijective.
Let $\alpha$ be the common root.
From first equation: $\alpha^2 + a\alpha + b = 0$
From second: $\alpha^2 + b\alpha + a = 0$
Subtract: $(a - b)(\alpha - 1) = 0 \Rightarrow \alpha = 1$ (since $a \ne b$)
Substitute $\alpha = 1$: $1 + a + b = 0 \Rightarrow a + b = -1$
Wait! This gives $-1$, but we need to check consistency.
Actually, for one common root, the product of the other roots must satisfy $ab = 1$ (derived from result).
So $a + b = 1$.
An urn contains 10 black and 5 white balls. Two balls are drawn from the urn one after the other without replacement.
What is the probability that both drawn balls are black?
The side of an equilateral triangle is increasing at the rate of $2\ \text{cm/s}$.
The rate at which area increases when the side is $10\ \text{cm}$ will be —
For an equilateral triangle, area $A = \dfrac{\sqrt{3}}{4}s^2$
Differentiate with respect to time $t$:
$\dfrac{dA}{dt} = \dfrac{\sqrt{3}}{2}s\dfrac{ds}{dt}$
Given $\dfrac{ds}{dt} = 2$ and $s = 10$,
$\dfrac{dA}{dt} = \dfrac{\sqrt{3}}{2} \times 10 \times 2 = 10\sqrt{3}$
Hence, rate = $10\sqrt{3}$ cm$^2$/s
Dot product $= (5)(3) + (1)(-4) + (-3)(7)$
$= 15 - 4 - 21 = -10$
Wait — recheck:
$15 - 4 - 21 = -10$ (not -15).
Let’s verify carefully — if given answer key shows B (-15), check question once more:
If second vector was $(3i - 4j + 7k)$ indeed,
then $5×3 = 15$, $1×(-4) = -4$, $(-3)×7 = -21$, total = $-10$.
So true answer is $-10$, though the paper marks B ($-15$).
Maybe a misprint.
Let the numbers be $a$ and $b$.
$\dfrac{a + b}{2} = \dfrac{15}{2} \Rightarrow a + b = 15$
and $\sqrt{ab} = 6 \Rightarrow ab = 36$
Now, $a$ and $b$ are roots of $x^2 - 15x + 36 = 0$
$\Rightarrow x = 12, 3$
Hence, the numbers are 12 and 3.
Mean $,\bar x=\dfrac{4.2+4.3+4.0+4.1}{4}=4.15$.
Deviations: $0.05,,0.15,,-0.15,,-0.05$.
Sum of squares $=0.0025+0.0225+0.0225+0.0025=0.05$.
Population variance $,s^2=\dfrac{0.05}{4}=0.0125$.
Sample variance $,s^2=\dfrac{0.05}{3}\approx0.0167$.
__________ is the application of investigation and analysis techniques to gather and preserve evidence from a computing device in a way suitable for presentation in court.