

InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
801. |
Write the output of the following code segment.char S1 [25]=” Computer”;char S2 [15]=” Applications”;strcat(S1 ,S2);cout<<S1; |
Answer» The output is “Computer Applicatios”. That is the second string is concatenated to the first string. |
|
802. |
When the number -7 is given as the argument of a predefined function in C++, it returns the value 7. Identify the function. |
Answer» abs(): This function returns the absolute value. |
|
803. |
float area(const float pi=3.1415, const float r){r=10;return pi*r;}Is there any problem? If yes what is it? |
Answer» There is an error. The error is , Y is a constant T must be initialised and cannot be changed during execution. |
|
804. |
Explain any three string function with example. |
Answer» Functions in C++ Some functions that are already available in C++ are called pre defined or built in functions. In C++, we can create our own functions for a specific job or task, such functions are called user defined functions. A C++ program must contain a main( ) function. A C++ program may contain many lines of statements(including so many functions) but the execution of the program starts and ends with main( ) function. Predefined functions To invoke a function that requires some data for performing the task, such data is called parameter or argument. Some functions return some value back to the called function. String functions To manipulate string in C++ a header le called string.h must be included. (a) strlen( )- to find the number of characters in a string(i.e. string length). Syntax: strlen(string); Eg- cout<<strlen(“Computer”);It prints 8. (b) strcpy( )- It is used to copy second string into first string. Syntax: strcpy(string1 ,string2); Eg. strcpy(str,”BVM HSS”); cout<<str; It prints BVM HSS. (c) strcat( )- It is used to concatenate second string into first one. Syntax: strcat(string1 ,string2) Eg. strcpy(str1 ,’’Hello”); strcpy(str2 ,” World”); strcat(str1 ,str2); cout<<str1 ; It displays the concatenated string “Hello World” (d) strcmp( )- it is used to compare two strings and returns an integer. Syntax: strcmp (string1,string2) if it is 0 both strings are equal. if it is greater than 0(i.e. +ve) string1 is greater than string2 if it is less than 0(i.e. -ve) string2 is greater than string1 Eg. include #include using namespace std; int main() { char str1 [10],str2[10]; strcpy(str1 ,”Kiran”); strcpy(str2,”Jobi”); cout<<strcmp(str1 ,str2); } It returns a +ve integer. (e) strcmpi( )- It is same as strcmp( ) but it is not case sensitive. That means uppercase and lowercase are treated as same. Eg. “ANDREA” and “Andrea” and “andrea” are the same. # include # include using namespace std; int main( ) { char str1 [10],str2[10]; strcpy(str1 ,”Kiran”); strcpy(str2 ,”KIRAN”); cout<<strcmpi(str1,str2); } It returns 0. That is both are same. |
|
805. |
“Initialized formal arguments are called default arguments.” Using this concept write the function prototype and definition of a user defined function Sum() which accepts two or three integer numbers and returns their sum. |
Answer» #include using namespace std; int sum(int x=100,int y=50,int z=10) { retum(x+y+z); } int main( ) { cout<<sum()<<endl; cout<<sum(1)<<endl; cout<<sum(1,2)<<endl; cout<<sum(1,2)<<endl; } |
|
806. |
Write a function that accept 3 numbers of type float as argument and return the average of three numbers. Write program which use this function to find the average of three numbers using C++. |
Answer» # include using namespace std; float avg(float n1 , float n2 , float n3) { return ((n1 + n2 + n3)/3); } int main( ) { float x, y, z; cout<<"Enter 3 nos”; cin>> x>>y>>z; cout<<“the average is”<<avg(x,y,z); } |
|
807. |
Write a program to read 2 strings and compare it. |
Answer» # include<iostream> # include<cstdio> # include<cstring> using namespace std; int main() { int m; char str1[100],str2[100]; cout<<"Enter first string"; gets(str1); cout<<"Enter second string"; gets(str2); m=strcmp(str1,str2); if(m<0) cout<<str1<<"is less than"<<str2; else if(m>0) cout<<str1<<"is greater than"<<str2; else cout<<str1<<"is equal to"<<str2; } |
|
808. |
Write a program to read a string and print the number of spaces. |
Answer» # include<iostream> # include<cstdio> using namespace std; int main() { char str[40]; int space=0,i; cout<<” Enter a string:”; gets(str); for(i=0;str[i]!='\0'/;i++) if(str[i]==32) space++; cout<<"The number of space is"<<space; } |
|
809. |
An assignment, Kumar has written a C++ program which reads a line of text and print the number of vowels in it. What will be his program code? |
Answer» # include<iostream> # include<cstdio> # include<cctype> using namespace std; int main() { char line(80); int i,vowel=0; puts(Enter a string"); gets(line); for(i=0;line[i]!='\0';i++) switch(to lower(line[i])) { case 'a': case 'e': case 'i': case 'o': case 'u': vowel++; } cout<<"The number of vowels is"<<vowel; } |
|
810. |
In his C++ program Ajith wants to accept a lengthy text of more than one line. Which function in C++ can be used in this situation. |
Answer» gets() function can be used to accept a lengthy text. |
|
811. |
Which of the following is a console function? (a) getline() (b) write() (c) put() (d) getchar() |
Answer» (d) getchar() |
|
812. |
Write a program to count the number of words in a sentence |
Answer» # include<iostream> # include<cstdio> using namespace std; int main() { int i,words=1; char str[80]; cout<<” Enter a string\n”; gets(str); for(i=0;str[i]!='\0'/;i++) if(str[i]==32) words++; cout<<"The number of words is"<<words; } |
|
813. |
How can you make a module ‘helloworld’ out of these two functions? def hello(): print ‘Hello,’,def world(): print ‘World!’ |
Answer» Put the functions in a file with name helloworld. py |
|
814. |
function is used to check whether a character is alphanumeric.(a) isdigit( ) (b) inalnum( ) (c) isupper( ) (d) islower( ) |
Answer» (b) isalnum( ); |
|
815. |
What gets printed? Assuming python version 2.x print type(l/2) |
Answer» python version 2.x print type(l/2) <type’int’> |
|
816. |
What gets printed with the following code ?x = 4.5 y = 2 print x//y |
Answer» print x//y = 2.0 |
|
817. |
What gets printed with the following code ? print “hello” ‘world’ |
Answer» On one line the text: helloworld |
|
818. |
What gets printed with the following code ?d= lambda p: p * 2 t = lambda p: p * 3 x = 2 x = d(x) x = t(x) x = d(x) print x |
Answer» print x = 24 | |
819. |
State whether the following statement is true or false. The'<<‘ insertion operator stops reading a string when it encounters a space. |
Answer» Statement is true. |
|
820. |
What gets printed by the code snippet below? import math print math.floor(5.5) |
Answer» snippet print = 5.0 |
|
821. |
What gets printed by the code snippet below? x = “foo ” y = 2 print x + y |
Answer» An exception is thrown. |
|
822. |
Consider the following code snippet main(){char str[80];gets(str);for(int i=0,len=0;str[i]!-\0';i++,len++);cout<<'The length of the string is "<<len;getch();}Select the equivalent for the under lined statement from the following (a) int len= strlen(str) (b) int len=strcmp(str) (c) int len = strcount(str) (d) None of these |
Answer» (a) int len= strlen(str) |
|
823. |
From the following which is equivalent to the function getc(stdin) (a) putchar() (b) gets()(c) getchar() (d) puts() |
Answer» (c) getchar() |
|
824. |
Distinguish getchar and gets. |
Answer» getchar is a character function but gets is a string function. The header file cstdio must be included. It reads a character from the keyboard. Eg. char ch; ch=getchar(); cout<<ch; gets is used to read a string from the key board. It reads the characters upto enter key. The header file cstdio must be included. char str[80]; cout<<” Enter a string”; gets(str); |
|
825. |
Explain gets( ) and puts ( ) functions |
Answer» gets( ) function is used to get a string from the key board including spaces. puts( ) function is used to print a string on the screen. To use gets( ) and puts ( ) function the header file cstdio must be included. |
|
826. |
To read a single character for gender i.e. ’rri’ or ’f’. .........function is used. (a) getch() (b) getchar() (c) gets()(d) getline() |
Answer» (b) getchar() |
|
827. |
To use getchar(), putchar(), gets() and puts(), which header file is used? (a) iostream (b) cstdio (c) input (d) output |
Answer» To use getchar(), putchar(), gets() and puts(), cstdio header file is used |
|
828. |
Varun wants to copy a string by using strcpy() function. From the following which header file is used for this? (a) cstdio (b) cmath (c) cstring |
Answer» (c) cstring |
|
829. |
If f(x) = \(\frac{1}{(2x+1)}\) and x ≠ \(\frac{-1}2\) then prove that f{(x)} = \(\frac{2x+1}{2x+3}\), when it is given that x ≠ \(\frac{-3}2\). |
Answer» Given: f(x) = \(\frac{1}{(2x+1)}\), where x ≠ \(\frac{-1}2\) Need to prove: f{f(x)} = \(\frac{2x +1}{2x+3}\) When x ≠ \(\frac{-3}2\) Now placing f(x) in place of x ⇒ f{f(x)} = \(\frac{1}{2f(x) + 1}\) ⇒ f{f(x)} = \(\frac{1}{2\frac{1}{2x+1 }+1}\) ⇒ f{f(x)} = \(\frac{1}{\frac{2+2x+1}{2x+1 }}\) = \(\frac{2x +1}{2x+3}\), Where x ≠ \(\frac{-3}2\) [proved] |
|
830. |
If f(x) = \(\begin{cases}x^2+3,&x\leq2\\5x+7,&x>2\end{cases}\), x2 + 3, x ≤ 2, 5x + 7, x > 2, then find(i) f(3)(ii) f(2)(iii) f(0) |
Answer» f(x) = x2 + 3, x ≤ 2 = 5x + 7, x > 2 (i) f(3) = 5(3) + 7 = 15 + 7 = 22 (ii) f(2) = 22 + 3 = 4 + 3 = 7 (iii) f(0) = 02 + 3 = 3 |
|
831. |
Show that the function f : N → N : f (x) = x2 is one-one and into. |
Answer» To prove: function is one-one and into Given: f : N → N : f (x) = x2 Solution: We have, f(x) = x2 For, f(x1) = f(x2) ⇒ x12 = x22 ⇒ x1 = x2 Here we can’t consider x1 = -x2 as \(x\in N\), we can’t have negative values ∴ f(x) is one-one f(x) = x2 Let f(x) = y such that \(y\in N\) ⇒ y = x2 \(\Rightarrow x=\sqrt{y}\) If y = 2, as \(y\in N\) Then we will get the irrational value of x, but \(x\in N\) Hence f(x) is not into Hence Proved |
|
832. |
Show that the function f : R → R : f (x) = x2 is neither one-one nor onto. |
Answer» To prove: function is neither one-one nor onto Given: f : R → R : f (x) = x2 Solution: We have, f(x) = x2 For, f(x1) = f(x2) ⇒ x12 = x22 ⇒ x1 = x2 or, x1 = -x2 Since x1 doesn’t has unique image ∴ f(x) is not one-one f(x) = x2 Let f(x) = y such that \(y\in R\) ⇒ y = x2 ⇒ \(x=\sqrt{y}\) If y = -1, as \(y\in R\) Then x will be undefined as we cannot place the negative value under the square root Hence f(x) is not onto Hence Proved |
|
833. |
Define the surjective function. Give an example. |
Answer» Surjective Function A function f: A → B is said to be onto if every element in B has at least one pre-image in A. Thus, if f is onto then for each y ∈ B ∃ at least one element x ∈ A such that y = f(x) Also, f is onto range f = B Example: Let N be the set of all natural numbers and let E be the set of all even natural numbers Let f: N → E: f(x) = 2x Ɐ x ∈ N Then, y = 2x => x = ½ y Thus, for each y ∈ E there exists ½ y ∈ N such that f(1/2 y) = (2 × ½ y) = y Hence, f is onto. |
|
834. |
Define the into function. Give an example. |
Answer» Into Function A function f: A → B is said to be into if there exists even a single element in B having no pre-image in A. So, f is into range (f) ⊂ B. Example: Let A = {2, 3, 5, 7} and B = {0, 1, 3, 5, 7} Let f: A → B: f(x) = (x – 2) then f(2) = (2 – 2) = 0 f(3) = (3 – 2) = 1 f(5) = (5 – 2) = 3 f(7) = (7 – 2) = 5 Thus, every element in A has a unique image in B Now ∃ 7 ∈ B having no pre-image in A Hence, f is into. |
|
835. |
Define the bijective function. Give an example. |
Answer» Bijective Function A one-one onto function is said to be bijective or a one-to-one correspondence. Example: If f(x) = x2 from set of positive real numbers to positive real numbers which is both surjective and injective. Hence, f is bijective function. |
|
836. |
Define the injective function. Give an example. |
Answer» Injective function A function f: A → B is said to be one-one if distinct elements in A have distinct images in B. Example: Let N be the set of all natural numbers. Let f: N → N: f(x) = 2x Ɐ x ∈ N Then, f(x1) = f(x2) 2x1 = 2x2 x1 = x2 Hence, f is one-one. |
|
837. |
Define a function. What do you mean by the domain and range of a function? Give examples. |
Answer» Definition: A relation R from a set A to a set B is called a function if each element of A has a unique image in B. It is denoted by the symbol f:A→B which reads ‘f’ is a function from A to B ‘f’ maps A to B Let f:A→B,then the set A is known as the domain of f & the set B is known as co - domain of f .The set of images of all the elements of A is known as the range of f. Thus, Domain of f = {a | a ∈ A,(a ,f(a)) ∈ f ) Range of f = {f(a) | a∈ A ,f(a) ∈ B } Example: The domain of y = sin x is all values of x i.e. R , since there are no restrictions on the values for x. The range of y is between −1 and 1. We could write this as −1 ≤ y ≤ 1. |
|
838. |
If f(x) = loge (1 – x) and g(x) = [x], then determine each of the following functions:(i) f + g(ii) fg(iii) f/g(iv) g/f Also, find (f + g) (–1), (fg) (0), (f/g) (1/2) and (g/f) (1/2). |
Answer» Given as f(x) = loge (1 – x) and g(x) = [x] As we know, f(x) takes real values only when 1 – x > 0 1 > x x < 1, ∴ x ∈ (–∞, 1) The domain of f = (–∞, 1) Similarly, g(x) is defined for all real numbers x. The domain of g = [x], x ∈ R = R (i) f + g As we know, (f + g) (x) = f(x) + g(x) (f + g) (x) = loge (1 – x) + [x] The domain of f + g = Domain of f ∩ Domain of g The domain of f + g = (–∞, 1) ∩ R = (–∞, 1) ∴ f + g: (–∞, 1) → R is given by (f + g) (x) = loge (1 – x) + [x] (ii) fg As we know, (fg) (x) = f(x) g(x) (fg) (x) = loge (1 – x) × [x] = [x] loge (1 – x) The domain of fg = Domain of f ∩ Domain of g = (–∞, 1) ∩ R = (–∞, 1) ∴ fg: (–∞, 1) → R is given by (fg) (x) = [x] loge (1 – x) (iii) f/g As we know, (f/g) (x) = f(x)/g(x) (f/g) (x) = loge (1 – x)/[x] = (–∞, 1) ∩ R = (–∞, 1) However, (f/g) (x) is defined for all real values of x ∈ (–∞, 1), except for the case when [x] = 0. Now, we have, [x] = 0 when 0 ≤ x < 1 or x ∈ [0, 1) If 0 ≤ x < 1, (f/g) (x) will be undefined as the division result will be indeterminate. The domain of f/g = (–∞, 1) – [0, 1) = (–∞, 0) ∴ f/g: (–∞, 0) → R is given by (f/g) (x) = loge (1 – x)/[x] (iv) g/f As we know, (g/f) (x) = g(x)/f(x) (g/f) (x) = [x]/loge (1 – x) However, (g/f) (x) is defined for all real values of x ∈ (–∞, 1), except for the case when loge (1 – x) = 0. loge (1 – x) = 0 ⇒ 1 – x = 1 or x = 0 If x = 0, (g/f) (x) will be undefined as the division result will be indeterminate. The domain of g/f = (–∞, 1) – {0} = (–∞, 0) ∪ (0, 1) ∴ g/f: (–∞, 0) ∪ (0, 1) → R is given by (g/f) (x) = [x]/loge (1 – x) (a) Here, we need to find (f + g) (–1). We have, (f + g) (x) = loge (1 – x) + [x], x ∈ (–∞, 1) By substituting x = –1 in the above equation, we get (f + g)(–1) = loge (1 – (–1)) + [–1] = loge (1 + 1) + (–1) = loge2 – 1 ∴ (f + g) (–1) = loge2 – 1 (b) Here, we need to find (fg) (0). We have, (fg) (x) = [x] loge (1 – x), x ∈ (–∞, 1) By substituting x = 0 in the above equation, we get (fg) (0) = [0] loge (1 – 0) = 0 × loge1 ∴ (fg) (0) = 0 (c) Here, we need to find (f/g) (1/2) We have, (f/g) (x) = loge (1 – x)/[x], x ∈ (–∞, 0) However, 1/2 is not in the domain of f/g. ∴ (f/g) (1/2) does not exist. (d) Here, we need to find (g/f) (1/2) We have, (g/f) (x) = [x]/loge (1 – x), x ∈ (–∞, 0) ∪ (0, ∞) By substituting x = 1/2 in the above equation, we get (g/f) (1/2) = [x]/loge (1 – x) = (1/2)/loge (1 – 1/2) = 0.5/loge (1/2) = 0/loge (1/2) = 0 Thus, (g/f) (1/2) = 0 |
|
839. |
Let f : R+ → R : f(x) = loge x. Find {x : f(x) = –2}. |
Answer» Given, f : R+ → R : f(x) = loge x f(x) = -2 loge x = -2 Taking antilog on both sides x = e-2 Hence, the value of x for which f(x) = -2 is e-2 |
|
840. |
Find x, if x = 33 log32 |
Answer» x = 33log32 = \(3^{log3(2^3)}\) = 23....[alogab = b] = 8 |
|
841. |
Show that the function `f : N to N ` defined by ` f(x) = {[x-1 if x is even], [x +1 if x is odd]}` is one-one and onto. |
Answer» Suppose `f(x_(1)) = f(x_(2))` Case 1 when `x_(1) ` is odd and `x_(2)` is even In this case `f(x_(1)) =f(x_(2)) rArr x_(1) +1 =x_(2)-1` `rArr x_(2) - x_(1)=2` This is a codtradication since that difference between an odd interger and an even integer can never be 2. Thus in this case `f(x_(1)) ne f(x_(2))` Similarly when `x_(1)` is even and `x_(2)` is odd then `f(x_(1)) ne f(x_(2))` Case 2 when `x_(1) " and " x_(2)` are both odd In this case `f(x_(1)) =f(x_(2)) rArr x_(1)+ 1 =x_(2) -1` `rArr x_(1) =x_(2)` `:.` f is one-one Case 3 When `x_(1) " and " x_(2)` are both even In this case `f(x_(1)) =f(x_(2)) rArr x_(1) -1 =x_(2) -1` `rArr x_(1)= x_(2)` `:.` f is one-one In order to show that f is onto let `y in N` (the codomain) Case 1 when y is odd In this case `(y +1)` is even `:. f( y+1) =(y+1)-1 =y` Case 2 when y is even In this case `(y-1) ` is odd `:. f (y-1) =y-1 +1=y` Thus each `y in N` (codomain of f) has its pre-image in dom (f) `:. ` f is onto. Hence f is one-one onto. |
|
842. |
Show that the function `f : R to R : f(x) =3-4 x` is one-one onto and hence bijective. |
Answer» We have `f(x_(1)) =f(x_(2)) rArr 3 -4x_(1) =3 - 4x_(2)` `rArr -4x_(1) =-4x_(2) rArr x_(1) =x_(2)` `:.` f is one-one. Now let `y= 3-4x.` Then `x= ((3-y))/(4)` Thus for each `y in R` (codomain of f) there exists `x=((3-y))/(4) in R` Such that `f(x) = ((3-y)/(4)) ={ 3-4 . ((3-y)/(4))} =3 -(3-y) =y` Thus shows that every elements in codomain of f has its pre-image in dom (f). `:. ` f is onto. `Hence the given function is bijective . |
|
843. |
Find gof and fog when f: R → R and g: R → R is defined by f(x) = 2x + 3 and g(x) = x2 + 5 |
Answer» Since, f:R → R and g:R → R fog:R → R and gof:R → R Now, f(x) = 2x + 3 and g(x) = x2 + 5 gof(x) = g(2x + 3) = (2x + 3)2 + 5 ⇒ gof(x) = 4x2 + 12x + 9 + 5 = 4x2 + 12x + 14 fog (x) = f(g(x)) = f (x2 + 5) = 2 (x2 + 5) + 3 ⇒ fog(x)= 2x2 + 10 + 3 = 2x2 + 13 Hence, gof(x) = 4x2 + 12x + 14 and fog (x) = 2x2 + 13 |
|
844. |
Find gof and fog when f: R → R and g: R → R is defined by f(x) = 2x + x2 and g(x) = x3 |
Answer» Since, f:R → R and g:R → R fog:R → R and gof:R → R f(x) = 2x + x2 and g(x)=x3 Now, gof(x) = g(f (x)) =g(2x + x2) gof (x)=(2x + x2)3 = x6 + 8x3 + 6x5 + 12x4 and fog(x)=f(g(x))= f(x3) ⇒ fog(x) = 2x3 + x6 So, gof(x) = x6 + 6x5 + 12x4 + 8x3 and fog(x) = 2x3 + x6 |
|
845. |
Mark (√) against the correct answer in the following: If f = {(1, 2), (3, 5), (4, 1)} and g = {(2, 3), (5, 1), (1, 3)} then (g o f) = ? A. {(3, 1), (1, 3), (3, 4)} B. {(1, 3), (3, 1), (4, 3)} C. {(3, 4), (4, 3), (1, 3)} D. {(2, 5), (5, 2), (1, 5)} |
Answer» Correct Answer is (B) {(1, 3), (3, 1), (4, 3)} g = {(2, 3), (5, 1), (1, 3)} (g o f) = {(dom(f), 3), (dom(f), 1), (dom(f), 3)} ⇒(g o f) = {(1, 3), (3, 1), (4, 3)} |
|
846. |
Mark (√) against the correct answer in the following:If f(x)\(=\sqrt[3]{3-x^3}\) then (f o f) (x) = ?\(A. x^{1/3}\)\(B.x\)\(C.(1-x^{1/3})\)D . None of these |
Answer» Correct Answer is (C) x \(f(x)=\sqrt[3]{3-x^3}\) \(\Rightarrow f(f(x))=\sqrt[3]{3-f(x)^3}\)\(=\sqrt[3]{3-(\sqrt[3]{3-x^3})^3}\) \(\Rightarrow f(f(x))=\sqrt[3]{3-(3-x^3)}\) \(\Rightarrow f(f(x))=\sqrt[3]{x^3}\) = x |
|
847. |
The function f : [0, ∞) → [0, ∞) defined by \(f(x) = \frac{2x}{1+2x}\) is(a) one-one and onto (b) one-one but not onto (c) not one-one but onto (d) neither one-one nor onto |
Answer» Answer : (b) one-one but not onto For all (x1, x2) ∈ [0, ∞) f (x1) = f (x2) ⇒\(\frac{2x_1}{1+2x_1}\) = \(\frac{2x_2}{1+2x_2}\) ⇒ 2x1 + 4x1x2 = 2x2 + 4x1x2 ⇒ 2x1 = 2x2 ⇒ x1 = x2 ⇒ f is one-one. Let y = f(x) = \(\frac{2x}{1+2x}\) ⇒ y + 2xy = 2x ⇒ y = 2x – 2xy = 2x (1 – y) ⇒ x = \(\frac{y}{2(1-y)}\) x is not defined when (1 – y) = 0, i.e., y = 1 ∈ [0, ∞) ⇒ f is not onto ∴ f is one-one, not onto. |
|
848. |
Mark (√) against the correct answer in the following: If f(x) = x2 – 3x + 2 then (f o f) (x) = ? A. x4 B. x4 – 6x3 C. x4 – 6x3 + 10x2 D. None of these |
Answer» Correct Answer is (D) None of these f(x) = x2 – 3x + 2 ⇒f(x) = x2 - 2x - x + 2 = x(x - 2) - 1(x - 2) ⇒f(x) = (x - 2)(x - 1) ⇒f(x) = (x - 2)(x - 1) ⇒f(f(x)) = ( f(x) - 2)( f(x) - 1) ⇒f(f(x)) = ((x - 2)(x - 1) - 2) ((x - 2)(x - 1) - 1) ⇒f(f(x)) = (x2 – 3x + 2 - 2) (x2 – 3x + 2 - 1) ⇒f(f(x)) = (x2 – 3x) (x2 – 3x + 1) ⇒f(f(x)) = x4 - 3x3 + x2 - 3x3 + 9x2 - 3x ⇒f(f(x)) = x4 - 6x3 + 10x2 - 3x |
|
849. |
Mark (√) against the correct answer in the following:If f(x) = x2, g(x) = tan x and h(x) = log x then \(\{ho(gof)\}(\sqrt{\frac{\pi}{4}})=?\)A. 0B. 1C. \(\frac{1}{x}\)D. \(\frac{1}{2}log\frac{\pi}{4}\) |
Answer» Correct Answer is (A) 0 f(x) = x2, g(x) = tan x and h(x) = log x \(\Rightarrow g(f(x))=tan(f(x))=tan(x^2)\) \(\Rightarrow h(g(f(x)))=log(g(f(x)))=log(tan(x^2))\) \(\Rightarrow h(g(f(\sqrt{\frac{\pi}{4}})))\)\(=log(tan(\sqrt{\frac{\pi}{4}}))\)\(=log(tan(\frac{\pi}{4}))\)\(=log(1)=0\) |
|
850. |
If b2 = ac. Prove that, log a + log c = 2 log b. |
Answer» b2 = ac Taking log on both sides, we get log b2 = log ac ∴ 2 log b = log a + log c ∴ log a + log c = 2 log b |
|