This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Write the objectives of ‘Project Tiger’. |
|
Answer» Following are the objectives of ‘Project Tiger’:
|
|
| 2. |
If a person thinks he is infected with HIV, due to unprotected sex, and goes for a blood test. Do you think a test such as ELISA will help? If so why? If not, why? |
|
Answer» Yes, ELISA is a highly sensitive and precise procedure and can detect antigens even in the range of a nanogram. So, it can be used to detect HIV in blood. |
|
| 3. |
Many tiger reserves are governed under Project Tiger. Can you give the number? |
|
Answer» There are 50 tiger reserves in India which are governed under Project Tiger. |
|
| 4. |
Why was the family surprised /shocked to see the grandfather awake ? |
|
Answer» The family was shocked to see the grandfather alive as all of them wanted to share his belongings which they would not be able to do then. |
|
| 5. |
Read the extracts given below and briefly answer the questions that follow :Chut ! Be quiet ! It’s ours now. Come Henry , lift your end.(a) Identify the speaker.(b) Why is the speaker insisting on being quiet ?(c) What ‘ours now’ is being talked about ?(d) Who is Henry ? |
|
Answer» (a) Mrs. Slater. (b) As they are stealing grandfather’s bureau before the others come. (c) The bureau of the grandfather. (d) Amelia’s husband. |
|
| 6. |
Find the range of each of the following functions:(i) | x – 3 | (ii) \(\sqrt{x-5}\)(iii) \(\sqrt{3x^2-4x+5}\)(iv) \(\frac{x}{1+x^2}\) |
|
Answer» (i) f (x) = | x – 3 | is defined for all x ∈ R, so domain of f (x) = R. Now | x – 3 | ≥ 0 for all x ∈ R ⇒ 0 ≤ | x – 3 | < ∞ for all x ∈ R ⇒ f (x) ∈ [0, ∞) for all x ∈ R ⇒ Range of f (x) = | x – 3 | is [0, ∞) (ii) Let y = f (x) = \(\sqrt{x-5}\) f (x) is defined for x – 5 ≥ 0 ⇒ x ≥ 5 ⇒ x ∈ [5, ∞) Now y = \(\sqrt{x-5}\) ⇒ x – 5 = y2 ⇒ x = y2 + 5 ⇒ x > 0 for all value of y For x to be real and x ∈ [5, ∞), y ∈ [0, ∞). ∴ Range of f is [0, ∞ ) (iii) Let y = f (x) = \(\sqrt{3x^2-4x+5}\) f (x) is defined if 3x2 – 4x + 5 ≥ 0 ⇒ 3\(\big(x^2-\frac{4}{3}x+\frac{5}{3}\big)\)≥ 0 ⇒ \(3\big(x^2-\frac{4}{3}x+\frac{4}{9}-\frac{4}{9}+\frac{5}{3}\big) \geq 0\) ⇒ 3 \(\big(\big(x-\frac{2}{3}\big)^2 +\frac{11}{9}\big) \geq 0\) , which is true for all real numbers, i.e., Domain of f is (– ∞, ∞) y = \(\sqrt{3x^2-4x+5}\) ⇒ 3x2 - 4x +5 =y2 ⇒ 3x2 - 4x +(5-y2) = 0 ⇒ x = \(\frac{4 \,\pm \sqrt{(-4)^2 -4 \times 3 \times (5-y^2)}}{2 \times 3}\) For x to be real, (– 4)2 – 4 × 3 × (5 – y2) ≥ 0 ⇒ 16 – 60 + 12y2 ≥ 0 ⇒ – 44 + 12y2 ≥ 0 ⇒ 12y2 ≥ 44 ⇒ \(y^2 \geq \frac{11}{3} \implies y \geq \sqrt{\frac{11}{3}}\) ∴ Range of y = [ \(\sqrt{\frac{11}{3}}\) , ∞ ) (iv) Let y = f(x) = \(\frac{x}{1+x^2}\) The given function f(x) = \(\frac{x}{1+x^2}\) is defined for all real numbers, so domain of f is R. y = \(\frac{x}{1+x^2}\) ⇒ x2y -x+y = 0 ⇒ x = \(\frac{-(-1)\, \pm \sqrt{1-4y^2}}{2y}\) Now, \(\frac{1\, \pm \sqrt{1-4y^2}}{2y}\) will be a real number if and only if 1 – 4y2 ≥ 0 and y ≠ 0 ⇒ 4y2 – 1 ≤ 0 and y ≠ 0 ⇒ \(\big( y^2 -\frac{1}{4}\big) \leq 0\) and y ≠ 0 ⇒ \(\big(y-\frac{1}{2}\big)\big(y+\frac{1}{2}\big) \leq 0\) and y ≠ 0 ⇒ \(-\frac{1}{2} \) \(\leq\) \(\frac{1}{2}\) and y ≠ 0 ⇒ y ∈ [ \(-\frac{1}{2} \), 0 ) \(\cup\) ( 0, \(\frac{1}{2}\) ] For x = 0, y = 0 ∴ range is [ \(-\frac{1}{2} \), \(\frac{1}{2}\) ] |
|
| 7. |
Find the range of the function f (x) = \(\frac{x^2 -2}{x^2 -3}\). |
|
Answer» Let y = \(\frac{x^2-2}{x^2-3}\) y = \(\frac{x^2-2}{x^2-3}\) is not defined for x2 – 3 = 0, i.e., x = ± \(\sqrt{3}\) ∴ Domain of y = R - { \(-\sqrt{3}\) , +\(\sqrt{3}\) } Now y = \(\frac{x^2-2}{x^2-3}\) ⇒ yx2 – 3y = x2 – 2 ⇒ x2 (y – 1) = 3y – 2 ⇒ \(x^2\) = \(\frac{3y-2}{y-1}\) ∵ LHS is a perfect square ⇒ \(\frac{3y-2}{y-1}\) ≥ 0 ⇒ (3y – 2) ≥ 0 and (y – 1) ≥ 0 or (3y – 2) ≤ 0, (y – 1) ≤ 0 and y ≠ 1 (Note) ⇒ y \(\geq \frac{2}{3}\) and y > 1 or y ≤ \(\frac{2}{3}\) , y < 1 ⇒ y ∈ (1, ∞) or y ∈ (- ∞ , \(\frac{2}{3}\)] ⇒ y ∈ (- ∞ , \(\frac{2}{3}\)] \(\cup\) (1, ∞) For x = ± \(\sqrt{3}\), y does not exist. |
|
| 8. |
If the domain of the function f (x) = x2 – 6x + 7 is (– ∞, ∞) then find the range of the function? |
|
Answer» Let f (x) = y = x2 – 6x + 7 ⇒ x2 – 6x + 7 – y = 0 ⇒ x = \(\frac{6\,\pm \sqrt{36-4(7-y)}}{2} = 3\,\pm \sqrt{8+4y}\) For real values of x, 8 + 4y ≥ 0 ⇒ y ≥ – 2 ∴ For f (x) = x2 – 6x + 7, the range is [– 2, ∞) |
|
| 9. |
Find the domain and range of the function \(\frac{x^2-4}{x-2}\). |
|
Answer» . Let y = \(\frac{x^2-4}{x-2}\) ⇒ y = x + 2 when x ≠ 2 Now \(\frac{x^2-4}{x-2}\) is not defined only when x = 2, therefore Domain of y = \(\frac{x^2-4}{x-2}\) is R - {2}. But y = x + 2 will take up all real values, but y = 4, when x = 2, (not possible) ∴ Range of function is R – {4}. |
|
| 10. |
The domain of the function f(x) =\(\sqrt{|x|}\) is (a) x ∈ (– ∞, ∞) (b) x ∈ (0, ∞) (c) x ∈ (– ∞, 0) ∪ (0, ∞) (d) x ∈ [0, ∞) |
|
Answer» Answer : (a) = x ∈ (– ∞, ∞) ∵ | x | ≥ 0 ∀ x ∈R ∴ \(\sqrt{|x|}\) is defined for all real values of x. Hence the domain of \(\sqrt{|x|}\) is R or (– ∞, ∞) |
|
| 11. |
The domain of the function f (x) = log x2 is (a) R (b) R+ (c) R – {0} (d) R+ ∪ {0} |
|
Answer» Answer : (c) = R – {0} Since logba is defined only when a > 0, b > 0 and b ≠ 1, log x2 is defined only when x2 > 0, which is true for all real values of x except x = 0. ∴ Domain of log x2 is R – {0}. |
|
| 12. |
The domain of the function \(f(x) = (\sqrt{x})^2\) is (a) – ∞ < x < ∞ (b) 0 < x < ∞ (c) 0 ≤ x < ∞ (d) None of these |
|
Answer» Answer : (c) = 0 ≤ x < ∞ Since \(\sqrt{x}\) is defined for only non-negative real numbers, therefore domain of f (x) = (\(\sqrt{x}\))2 is [0, ∞). |
|
| 13. |
The range of the real function \(f(x) =\frac{1}{1-x^2}\) is(a) R – {– 1, 1} (b) (0, ∞) (c) [1, ∞) (d) (– ∞, 0) |
|
Answer» Answer : (c) [1, ∞) f(x) = \(\frac{1}{1-x^2}\) is not defined when 1 – x2 = 0, i.e. x = ± 1 ∴ Domain of f (x) = R – {– 1, 1} Let y = \(\frac{1}{1-x^2}\) ⇒ (1-x2) = \(\frac{1}{y}\) ⇒ x2 = 1 - \(\frac{1}{y}\) ⇒ \(x\,\pm\sqrt{1-\frac{1}{y}}\) This shows that x will not be defined when 1 - \(\frac{1}{y}\) < 0, i.e., y < 1 ∴ Range of f : y ≥ 1, i.e. y ∈ [1, ∞) |
|
| 14. |
Find the domain of \(\sqrt{x} +\sqrt{3x-2}\) |
|
Answer» Let f (x) = \(\sqrt{x}\) and g(x) = \(\sqrt{3x-2}\) Let the domain of f (x) be A and that of g(x) be B Then, domain of f (x) = A = [0, ∞] (∵ \(\sqrt{x}\) is defined when x > 0 ) domain of g(x) = B = (\(\frac{2}{3}, \) ∞ ) (∵ \(\sqrt{3x-2}\) is defined when 3x-2 ≥ 0 ⇒ x ≥ \(\frac{2}{3}\) ) ∴ Domain of \(\sqrt{x}\) + \(\sqrt{3x-2}\) = A \(\cap\) B = [0, ∞ ) \(\cap\) [\(\frac{2}{3} \) , ∞ ) = [ \(\frac{2}{3} \), ∞) |
|
| 15. |
Write the domain of the following real functions?(a) \(\sqrt{9-x^2}\)(b) 10x (c) \(\frac{2}{4x+7}\)(d) log (2 – 3x) |
|
Answer» (i) Since f is a real function, 9 – x2 ≥ 0 ⇒ (3 + x) (3 – x) ≥ 0 ⇒ – a ≤ x ≤ a ∴ Domain of f (x) = \(\sqrt{9-x^2}\) is {x| – 3 ≤ x ≤ 3}. (ii) Let f (x) = 10x ax is defined for all real values of x when a > 0 Here a = 10, ∴ Domain of f (x) = 10x is R. (iii) f (x) = \(\frac{2}{4x+7}\) Since f is real, x can take all real values except the value for which 4x + 7 = 0, i.e., x = \(-\frac{7}{4}\) ⇒x ≠ \(-\frac{7}{4}\) ∴ Domain of f (x) = \(\frac{2}{4x+7}\) = R - { \(-\frac{7}{4}\) }. (iv) f (x) = log (2 – 3x) For f (x) to be defined (2 – 3x) > 0 ⇒ 2 > 3x ⇒ x < \(\frac{2}{3}\) ∴ Domain of f (x) = log (2 – 3x) = −∞< x < \(\frac{2}{3}\) or x \(\in\) (−∞ \(\frac{2}{3}\) ) |
|
| 16. |
If f : R → R and is defined by f(x) = \(\frac{1}{2-cos 3x}\) for each x ∈ R, then the range of f is(a) ( \(\frac{1}{3}\), 1) (b) [ \(\frac{1}{3}\), 1] (c) (1, 2) (d) [1, 2] |
|
Answer» Answer : (b) [ \(\frac{1}{3}\),1] f(x) = \(\frac{1}{2-cos\,3x}\) – 1 ≤ cos 3x ≤ 1 ⇒ – 1 ≤ – cos 3x ≤ 1 (Multiplying all terms by – 1) ⇒ 2 – 1 ≤ 2 – cos 3x ≤ 3 (Adding 2 to each term) ⇒ 1 ≤ 2 – cos 3x ≤ 3 ⇒ \(1\geq \frac{1}{2-3\,cos\,3x}\geq \frac{1}{3}\) Range of f is [ \(\frac{1}{3}\),1] |
|
| 17. |
The range of the function f (x) = x2 +\(\frac{1}{x^2+1}\) (a) [1, ∞) (b) [2, ∞) (c) [ \(\frac{3}{2}\), ∞ ) (d) None of these |
|
Answer» Answer: (a) [1, ∞) Given f(x) = x2 + \(\frac{1}{x^2+1}\) = \(\frac{x^4+x^2+1}{x^2+1}\) = \(\frac{x^4+2x^2+1-x^2}{x^2+1} = \frac{(x^2+1)^2-x^2}{x^2+1}\) = \((x^2+1) - \frac{x^2}{x^2+1}\) = 1+ x2 \(\big(1-\frac{1}{x^2+1}\big)\) \(\geq\) 1 \(\forall\) x \(\in\) R ∴ Range of f (x) = [1, ∞ ). |
|
| 18. |
The range of the function f(x) = \(\sqrt{(x-1)(3-x)}\) is(a) [0, 1] (b) (–1, 1) (c) (–3, 3) (d) (–3, 1) |
|
Answer» Answer : (a) [0, 1] Let y = f(x) = \(\sqrt{(x-1)(3-x)}\) ⇒ y2 = (x – 1) (3 – x) = – x2 + 4x – 3 ⇒ x2 – 4x + (3 + y2) = 0 This is a quadratic in x, so \(x = \frac{+4\,\pm\sqrt{16-4(3+y^2)}}{2}\) = \(\frac{4\,\pm\,2\sqrt{1-y^2}}{2}\) Since x is real, 1 – y2 ≥ 0 ⇒ y2 – 1 ≤ 0 ⇒ – 1 ≤ y ≤ 1 But f (x) attains only non-negative values, so range of f = [0, 1] |
|
| 19. |
Let f:{ x, \(\frac{x^2}{1+x^2}\) : x ∈ R} be function from R → R, the range of f is(a) [0, 1] (b) [0, 1) (c) (0, 1] (d) (– ∞, ∞) |
|
Answer» Answer : (b) [0, 1) . Let y = \(\frac{x^2}{1+x^2}\) ≥ 0 for all x ∈ R ⇒ y (1 + x) 2 ≥ x2 ⇒ y + yx2 – x2 ≥ 0 ⇒ (y – 1)x2 + y ≥ 0 Let y = \(\frac{x^2}{1+x^2}\) and y ≥ 0 for all x ∈ R. ⇒ \(\frac{x^2}{1+x^2}\) ≥ 0 Also x2 < x2 + 1 ⇒ \(\frac{x^2}{1+x^2}\) < 1 ∴ Required range = [0, 1). |
|
| 20. |
How to find Range of a function y = f(x) ? |
|
Answer» To find the range of a function y = f (x): Step 1. Find the domain of the function y = f (x) Step 2. Solve the equation y = f (x) to find x in terms of y. Step 3. Find the real values of y for which x is real. The set of values of y so obtained makes up the range of f |
|
| 21. |
What is the range of a function? |
|
Answer» Once the domain of a function f (x) is known, the set of all the values that f (x) can take is called the range of the function. |
|
| 22. |
what are the important points to check while finding the domain of a function? |
|
Answer» To find the domain of a function, following points should be kept in mind: (i) For algebraic functions (a) denominator should be non-zero (b) expression under an even root should be non-negative (ii) For trigonometric functions (a) sin x and cos x are defined for all values of x (b) tan x and sec x are defined for all real values of x except x =\((2n+1)\frac{\pi}{2}\) where n∈I. (c) cot x and cosec x are defined for all real values of x except x = n π, where n ∈ I. (iii) Logarithmic functions: logb a is defined when a > 0, b > 1 and b ≠ 1. (iv) Exponential functions: ax is defined for all real values of x, where a > 0 |
|
| 23. |
Define the Domain of a function? |
|
Answer» The set of numbers x for which the function f (x) is defined is called the domain of the function. Ex. (i) f (x) = \(\frac{1}{x}\) ; Domain = R – {0} as the function is defined for all real numbers except 0. (ii) f (x) = \(\sqrt{x}\) ; Domain = All non-negative real numbers as \(\sqrt{x}\) is not defined when x is a negative real numbers. |
|
| 24. |
What is the condition of structure assignments? |
|
Answer» Structure assignment is possible only if both structure variables/objects are same type. |
|
| 25. |
What will be the output of this program?#includeusing namespace std;struct Shoe Type{ string name;double price;};int main(){ShoeType shoel, shoe2;shoe 1.name = “Adidas”;shoel.price = 9.99;cout << shoel.name << “#” <<shoel.price<<endl;shoe2 – shoel;shoe2.price = shoe2.price / 9;cout <<shoe2.name << “#”<< shoe2.price;return 0;(a) Adidas # 9.99; Adidas # 1.11(b) Adidas # 9.99; Adidas # 9.11(c) Adidas # 9.99; Adidas # 11.11(d) Adidas # 9.11; Adidas # 11.11 |
|
Answer» (a) Adidas # 9.99; Adidas # 1.11 |
|
| 26. |
What is global object? |
|
Answer» Objects declared along with structure definition are called global objects. |
|
| 27. |
Write about returning structures from functions. |
|
Answer» A structure can be passed to a function through its object. Therefore, passing a structure to a function or passing a structure object to a function is the same because structure object represents the structure. Like a normal variable, structure variable(structure object) can be passed by value or by references / addresses. Similar to built-in data types, structures also can be returned from a function. |
|
| 28. |
Why structures are usually passed by reference method? |
|
Answer» Structures are usually passed by reference method because it saves the memory space and executes faster. |
|
| 29. |
Objects declared along with structure definition are called ……….(a) structure (b) nested structure (c) global objects (d) memory |
|
Answer» (c) global objects |
|
| 30. |
Write the output of the following C++ program#include#include#include#includeusing namespace std;struct books{char name[20], author[20];}a[50];int main() |
|
Answer» Output: Details of Book No. 1 Book name : Programming Book author : Dromy Details of Book No. 2 Book Name : C++ Programming Book Author : Bjame Stroustrup 1 Iprogrammingl Dromy 2| C++ Programming | Bjame Stroustmp |
|
| 31. |
What is the error in the following structure definition? struct employee {inteno ;chamame [20] ;char dept;}Employee e1,e2; |
|
Answer» Errors: 1. ‘i’ is missing. 2. Spaces are missing at two places 3. Structure name given wrongly. Corrected structure: struct employee {int eno; char ename [20]; char dept;} employee e, e2; |
|
| 32. |
Write a C++ program to add two distances using the following structure definition, struct Distance!int feet;float inch;}d1, d2, sum; |
|
Answer» int main() { cout<<“Enter 1st distance:”<<end1; cout<<“Enter feet:”; cin>>d1.feet; cout <<“Enter inch:”; cin >> d1.inch; cout << “\n information for 2nd distance:” << end1; cout<<“Enter feet:”; cin >> d2.feet; cout <<“Enter inch:”; cin >> d2.inch; sum.feet = d1 . feet + d2.feet; sum.inch = d1.inch + d2.inch; if (sum.inch > 12) { ++ sum.feet; sum.inch = 12; } cout << end1; “Sum of distance = ” << sum.feet << “feet” << sum.inch <<“inches”; return 0; } Output: Enter 1 st distance Enter feet: 6 Enter inch: 3.4 Enter 2nd distance Enter feet: 5 Enter inch: 10.2 Sum of distances = 12 feet 1.6 inches |
|
| 33. |
Explain call by value with respect to structure. |
|
Answer» When a structure is passed as argument to a function using call by value method, any change made to the contents of the structure variable inside the function to which it is passed do not affect the structure variable used as an argument. #include using namespace std; struct Employee { char name[50]; int age; float salary; }; void printData(Employee); // Function declaration int main() { Employee p; cout << "Enter Full name:";cin>>p.name; cout << "Enter age :";cin>>p.age; cout << "Enter salary:";cin>>p.salary; // Function call with structure variable as an argument printData(p); return 0; } void printData(Employee q) { cout << “\nDisplaying Information.” << endl; cout << “Name:” << q.name << endl; cout <<”Age:” << q.age << endl; cout << “Salary:” << q.salary; } Output: Enter Full name: Kumar Enter age : 55 Enter salary : 34233.4 Displaying Information. Name : Kumar Age : 55 Salary : 34233.4 In the above example, a structure named Employee is declared and used. The values that are entered into the structure are name, age and salary of a Employee are displayed using a function named print Data(). The argument for the above function is the structure Employee. The input can be received through a function named readData(). |
|
| 34. |
Why for pacing a structure to a function call by reference is advisable to us? |
|
Answer» In this method of passing the structures to functions, the address of a structure variable /object is passed to the function using address of(&) operator. So any change made to the contents of structure variable inside the function are reflected back to the calling function. |
|
| 35. |
What is the syntax to declare two – dimensional array. |
|
Answer» The declaration of a 2 – D array is data – type array_name[row – size] [col – size]; In the above declaration, data-type refers to any valid C++ data – type, array _ name refers to the name of the 2 – D array, row – size refers to the number of rows and col-size refers to the number of columns in the 2 – D array. |
|
| 36. |
What is the formula to calculate memory space allocated for an array? |
|
Answer» Number of bytes allocated for type of array x Number of elements. |
|
| 37. |
A structure declaration is given below,struct Time{int hours;int minutes;int seconds;} t;Using above declaration which of the following refers to seconds.(a) Time.seconds(b) Time::seconds(c) seconds(d) t. seconds |
|
Answer» (d) t. seconds |
|
| 38. |
Which of the following is a properly defined structure? (a) struct {int num;}(b) struct sum {int num;}(c) struct sum int sum;(d) struct sum {int num;}; |
|
Answer» (d) struct sum {int num;}; |
|
| 39. |
Structure definition is terminated by(a) :(b) }(c) ;(d) :: |
|
Answer» Structure definition is terminated by ; |
|
| 40. |
What is the output of this program?#include#includeusing namespace std;int main(){struct student{int n;char name[10];};student s;s.n = 123;strcpy(s.name, “Balu”);cout <<d.n;cout<< s.name << endl;return 0;}(a) 123Balu(b) BaluBalu(c) Balul23(d) 123 Balu |
|
Answer» (d) 123 Balu |
|
| 41. |
Write a note on Array of strings. |
|
Answer» An array of strings is a two – dimensional character array. The size of the first Index (rows) denotes the number of strings and the size of the second index (columns) denotes the maximum length of each string. Usually, array of strings are declared in such a way to accommodate the null character at the end of each string. For example, the 2 – D array has the declaration: char name [7][10]; In the above declaration, No. of rows = 7; No. of columns =10; We can store 7 strings each of maximum length 10 characters. |
|
| 42. |
A structure declaration is given below,struct employee{int empno;char ename[10];} e[5];Using above declaration which of the following statement is correct?(a) cout <<e[0].empno << e[0] → ename;(b) cout << e[0].empno << ename;(c) cout<<e[0]→ empno << e[0] → ename;(d) cout << e.empno << e.ename; |
|
Answer» (a) cout <<e[0].empno << e[0] → ename; |
|
| 43. |
The data elements in the structure are also known as ………..(a) objects(b) members(c) data(d) records |
|
Answer» The data elements in the structure are also known as objects |
|
| 44. |
Define an Array. What are the types? |
|
Answer» “An array is a collection of variables of the same type that are referenced by a common name”. An array is also a derived datatype in C++. There are different types of arrays used in C++. They are: 1. One – dimensional arrays 2. Two – dimensional arrays 3. Multi – dimensional arrays |
|
| 45. |
Write a C++ program to accept and print your name. |
|
Answer» #include using namespace std; int main() { charname[5]; cout<<“Enter your name:”; cin >>name; cout<< “My name is”<< name; } Output: Enter your name: PRIYA My name is PRIYA |
|
| 46. |
To store 100 integer number which of the following is good to use? Array or Structure. State the reason. |
|
Answer» Array is good to use. Reasons: 1. All 100 numbers are integer type. 2. Array index helps to access the numbers quickly. |
|
| 47. |
What will happen when the structure is declared?(a) it will not allocate any memory(b) it will allocate the memory(c) it will be declared and initialized(d) it will be only declared |
|
Answer» (b) it will allocate the memory |
|
| 48. |
Which of the following cannot be a structure member?(a) Another structure(b) Function(c) Array(d) variable of double datatype |
|
Answer» (b) Function |
|
| 49. |
Define structure. What is its use? |
|
Answer» Structure is a user – defined which has the combination of data items with different data types. This allows to group of variables of mixed data types together into a single unit. The structure provides a facility to store different data types as a part of the same logical element in one memory chunk adjacent to each other. |
|
| 50. |
What is called anonymous structure? Give an example. |
|
Answer» A structure without a name/tag is called anonymous structure. Example: struct { long rollno; int age; float weight; }; The student can be referred as reference name to the above structure and the elements can be accessed like student.rollno, student.age and student.weight. |
|