Correct answer: parameters are always passed by values
Concept note In C programming language, parameters are always passed by value. This means that when a function is called, the value of the orguments are copied to the function's parameters. Any changes made to the parameters inside the function do not affect the original arguments. Even when pointers are passed to a function, the pointer are passed to a function, the pointer itself is passed by value, although it can be used to modify the data it points to.
Correct answer: Read maximum 4 characters from console
Concept note The C statement 'Scanf ("%4s",str);' means that the function will read a maximum of 4 characters from the console input and store them in the 'str' array. This includes any spaces and the null terminator, which signifies the end of the string. Therefore, the correct answer is option (b).
Concept note Among expression I. A[2], II. A[2] [3], and IV. B[2] [3], only III B [1] will yield a compile - time error when used as the left-hand side of assignment statements. Arrays aren't assignable in C. The rest are valid assignments referencing pointers or specific array elements.
Concept note In given C program, the continue statement skips the remaining statements in the current interation of the loop and proceeds to the next itration. In this program, there are no statements after the continue, so its presence doesn't affect the program's behavior. The output is simply the numbers from 1 to 5 printed sequentially 12345.
Correct answer: p is a pointer to an array of 5 integers
Concept note p is a pointer. The parentheses around *P indicate that p is not just a pointer to an int, but a pointer to an array. [5] indicates that the array has 5 elements. So, the declaration int (*P) [5]; means that p is a pointer to an array of 5 integers.
Concept note Make the relation R = {(1, 2), (2, 3)} reflexive, symmetric and transitive, we need to systematically add pairs to satisfy these properties. • Reflexive pairs : (1, 1), (2, 2), (3, 3) • Symmetric pairs : (2, 1), (3, 2) • Transitive pairs : (1, 3), (3, 1) Adding all the required pairs:
{(1, 1), (2, 2), (3, 3), (2, 1), (3, 2), (1, 3), (3, 1)}
This results in 7 new pairs. The range of the function f(x) = x2/(1+x2) is
Concept note A and B are both 8-bit numbers, so each has 28 possible values. To satisfy the condition A + B ≤ 28, we need to count all possible combinations of A and B. Since A and B are both 8-bit numbers, the total number of combinations of A and B is 28 × 28 = 216. Therefore, the correct answer is 216.
Concept note A tautology is a statement that is always true, irrespective of the truth values of its components. If a ∧b is true, then b ∨c is always true.
Concept note A complete graph with n vertices has
(
)
−
n n
1
=
e edges. A spanning tree of a graph with n
2
vertices has n – 1 edges. When remove the edges of the spanning tree from the complete graph, the number of edges left is e – (n – 1). Thus, after removing the edges of a spanning tree, the graph will have e – n + 1.
Concept note Given 8 Indians, 4 Americans and 4 Englishmen such that all persons of the same nationality sit together. This involves treating each nationality as a single 'block', then arranging the people within each block. • The 8 Indians can be arranged among themselves in 8! ways. • The 4 Americans can be arranged among themselves in 4! ways. • The 4 Englishmen can be arranged among themselves in 4! ways. • There are 3 blocks (Indians, Americans, Englishmen). The block can be arranged among themselves in 3! ways. Multiply the arrangements of the blocks and the arrangements within each block.
Total ways = 3! × 8! × 4! × 4!
Concept note The number of ways to choose 2 vowels out of 4 is given by the combination formula-
4!
=
=
4
C
6
(
)
2
−
2! 4
2 !
The number of ways to choose 3 consonants out of 5 is given by-
5!
=
=
5
C
10
(
)
3
−
3! 5
3 !
Once we have choosen our 2 vowels and 3 consonants, the total number of ways to arrange these 5 letters is -
5! = 120
Putting it all together, the total number of words formed is
= 6 × 10 × 120 = 7200.
× ×
4
5
C
C
5!
2
3
The output F of the circuit is given by-
Concept note An SR flip-flop (Set - Reset flip - flop) is a memory element because it can store one bit of information. It is a bistable circuit that maintains its state until an input causes it to change.
Concept note A universal gate is a type of logic gate that can be used to implement any Boolean function without the need to use any other type of gate. The NAND gate is considered a universal gate because any Boolean function can be implemented using a combination of NAND gates.
Concept note To convert the gray code 11100 to binary. 1. The most significant bit (MSB) of the binary code is the same as the MSB of the gray code. 2. Each subsequent binary bit is obtained by XORing the previous binary bit with the corresponding gray code bit. Thus, the binary equivalent of gray code 11100 is
10111.
Concept note A group must satisfy the following properties (i) Associativity (ii) Existence of inverse for every element (iii) Existence of identity However, commutativity is not a requirement for a set to be considered a group. A group that satisfies the commutative property is specifically called an abelian group, but not all groups are abelian.
Concept note A reflexive relation on a set requires that every element is related to itself. If the set has n elements, the relation is a subset of the cartesian product A × A, where A is the set. Since reflexivity requires that all diagonal elements (ai, ai) must be included, only the off -diagonal elements are optional. For a set A with 5 elements, the number of pairs in A×A is 52. Reflexivity fixes 5 diagonal pairs, leaving 52 – 5 off diagonal pairs that can either be included or excluded independently. Thus, the number of reflexive relations is 225–5 = 220.
Concept note The first digit must be 3 or 4, as the number needs to be greater than 3000. • If first digit is 3 then the rest of the numbers must come from the list 2, 2, 3, 3, 4, 4, 4, 4. Therefore we may choose any 3-digit sequence except 222 and 333 for the rest of the digits. This shows there are 3 × 3 × 3 – 2 = 25 numbers in this case. • If first digit is 4 then the rest of the number must come from the list 2, 2, 3, 3, 3, 4, 4, 4. Therefore we may choose any 3-digit sequence except 222 for the rest of the digits. This shows there are 3×3×3 – 1 = 26 number in this case. Now, the total numbers is just 25 + 26 = 51.
Concept note In Boolean algebra, the number of different Boolean functions that can be define involving n n
2
2
Boolean variables is . This is because each Boolean function can have 2n possible input combinations (for n variables), and for each combination there can be two possible outputs (0 or 1).
Concept note The number of equivalence relations on a set is equal to the number of partitions of the set. This is given by the Bell number, denoted as Bn, where n is the size of the set. For the set {1, 2, 3, 4,}; n = 4 The Bell numbers for n are, B1 = 1, B2 = 2, B3 = 5, B4 =
15.
Thus, the number of equivalence relations for the set {1,
2, 3, 4} is 15.
Concept note The range of a function is the set of all possible output values (the second components of the ordered pairs). Given the function:
{(4, 8), (9, 2), (–3, –4)}
The output are 8, 2 and –4. Thus, the range is {8, 2, –4}.
Advertisement
Your privacy choices
We use essential cookies to keep the site secure and remember your choices. With your permission, analytics and advertising providers may use data for measurement, ad delivery, and ads personalization.
Essential storage is always active because it supports security, sessions, saved preferences, and core site features. The other choices are optional and can be changed later.
Essential
Required for security, forms, sessions, and remembering this consent choice.