Question Set

1. Will the following functions work? int f1(int a, int b) { return ( f2(20) ); } int f2(int a) { return (aa); }



Ask Your Doubts Here

Type in
(Press Ctrl+g to toggle between English and the chosen language)

Comments

  • By: guest on 01 Jun 2017 06.01 pm
    Yes, It will return the value 20*20 = 400 Example: #include <stdio.h> int f1(int, int); /* Function prototype */ int f2(int); /* Function prototype */ int main() { int a = 2, b = 3, c; c = f1(a, b); printf("c = %d\n", c); return 0; } int f1(int a, int b) { return ( f2(20) ); } int f2(int a) { return (a * a); } Output:
    c = 400
Show Similar Question And Answers
QA->P and Q can do a work in 30 days. Q and R can do the same work in 24 days and R and P in 20 days. They started the work together, but Q and R left after 10 days. How many days more will P take to finish the work?....
QA->P and Q can complete a work in 15 days and 10 days respectively. They started the work together and then Q left after 2 days. P alone completed the remaining work. The work was finished in --- days.....
QA->A can complete a work in 12 days with a working of 8 hours per day. B can complete the same work in 8 days when working 10 hours a day. If A and B work together, working 8 hours a day, the work can be completed in --days.....
QA->P and Q can complete a work in 20 days and 12 days respectively. P alone started the work and Q joined him after 4 days till the completion of the work. How long did the work last?....
QA->P can do a work in the same time in which Q and R together can do it. If P and Q work together, the work can be completed in 10 days. R alone needs 50 days to complete the same work. then Q alone can do it in....
MCQ->What will be the output of the program? #include<stdio.h> int fun(int, int); typedef int (pf) (int, int); int proc(pf, int, int); int main() { printf("%d\n", proc(fun, 6, 6)); return 0; } int fun(int a, int b) { return (a==b); } int proc(pf p, int a, int b) { return ((p)(a, b)); }....
MCQ->Which of the following statement is correct about the program given below? #include<iostream.h> int BixTest(int x, int y); int BixTest(int x, int y, int z = 5); int main() { cout<< BixTest(2, 4) << endl; return 0; } int BixTest(int x, int y) { return x y; } int BixTest(int x, int y, int z = 5) { return x y z; }....
MCQ->Which of the following statements are correct about static functions? Static functions can access only static data. Static functions cannot call instance functions. It is necessary to initialize static data. Instance functions can call static functions and access static data. this reference is passed to static functions.....
MCQ->What will be the output of the program? #include<stdio.h> int i; int fun1(int); int fun2(int); int main() { extern int j; int i=3; fun1(i); printf("%d,", i); fun2(i); printf("%d", i); return 0; } int fun1(int j) { printf("%d,", ++j); return 0; } int fun2(int i) { printf("%d,", ++i); return 0; } int j=1;....
MCQ->Assertion (A): C has a large number of library functions classified as arithmetic functions, data conversion functions, character classified functions, string manipulation functions, searching and sorting functions etc.Reason (R): 8086 uses a segment : offset addressing scheme.

....
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions
Question ANSWER With Solution