Menu

(Solved) : Function O Function Fundamental Modular Unit Function Usually Designed Perform Specific Ta Q43992148 . . .

What is function? O Function is the fundamental modular unit. A function is usually designed to perform a specific task. O AlDetermine Output. --------- -- main() int i = abc(10); printf(%d, --i); int abc(int i) return(i++); O 11 O none of these 09Which of the following functions calculate the Square of x in C? O sqr(x) O power(x, 2) o pow(2,x) O pow(x, 2) O power(2,x)char* myfunc(char *ptr) { ptr+=3; return(ptr); void main() char *x, *y; x = EXAMVEDA; y = myfunc(x); printf(y=%s, y); WhaWhat is a correct way to initialize array? O int n{} = {2, 4, 12,5, 45, 5 }; O int n{6} = {2,4, 12 }; O int n(6) = { 2, 4, 12Determine Output. ------------------------ #include <stdio.h> int main(void) char p; char buf[10] = {1, 2, 3, 4, 5, 6, 9, 8};Which of the following is C++ equivalent for scanf()? O cin o O input o O cout O printWhat will be the output of the following C++ code? #include<iostream> using namespace std; int x = 1; int main() { int x = 2;What will be the output of the following C++ code? #include<iostream> using namespace std; int x[100]; int main() cout << x[9Which of the following escape sequence represents tab? o ItrWhat will be the output of the following C++ code? #include <iostream> using namespace std; class Player private: int id; staWhat does the following declaration mean? int (*ptr)[10]; O ptr is an pointer to array O ptr is an array of 10 integers O ptrWhat will be the value stored in arr[5] when the following code is executed? #include<stdio.h> int cat_number(int n) int i, jMatrix A is of order 3*4 and Matrix B is of order 4*5. How many elements will be there in a matrix A*B multiplied recursivelyRecursion is similar to which of the following? O Switch Case O If-else O Loop O if elif else

What is function? O Function is the fundamental modular unit. A function is usually designed to perform a specific task. O All of the above O Function is a block of code that performs a specific task. It has a name and it is reusable. O Function is a block of statements that perform some specific task. Determine Output. ——— — main() int i = abc(10); printf(“%d”, –i); int abc(int i) return(i++); O 11 O none of these 09 O 10 Which of the following functions calculate the Square of ‘x’ in C? O sqr(x) O power(x, 2) o pow(2,x) O pow(x, 2) O power(2,x) char* myfunc(char *ptr) { ptr+=3; return(ptr); void main() char *x, *y; x = “EXAMVEDA”; y = myfunc(x); printf(“y=%s”, y); What will be printed when the sample code above in executed? O y=EXAMVEDA O y=MVEDA O y=EDA O y=VEDA O y=AMVEDA What is a correct way to initialize array? O int n{} = {2, 4, 12,5, 45, 5 }; O int n{6} = {2,4, 12 }; O int n(6) = { 2, 4, 12, 5, 45, 5 }; O int num[6] = { 2, 4, 12, 5, 45, 5 }; Determine Output. ———————— #include <stdio.h> int main(void) char p; char buf[10] = {1, 2, 3, 4, 5, 6, 9, 8}; p = (buf + 1) [5]; printf(“%d”, p); return 0; …………………———-……………… …………….————— — – 05 o o 06 O error O None of the above Which of the following is C++ equivalent for scanf()? O cin o O input o O cout O print What will be the output of the following C++ code? #include<iostream> using namespace std; int x = 1; int main() { int x = 2; int x = 3; cout << ::X << endl; return 0; O O 123 02 03 0 1 What will be the output of the following C++ code? #include<iostream> using namespace std; int x[100]; int main() cout << x[99] << endl; O Error O Garbage value О 99 oo Which of the following escape sequence represents tab? o Itr What will be the output of the following C++ code? #include <iostream> using namespace std; class Player private: int id; static int next_id; public: int getID() { return id; } Player() { id = next_id++; } int Player:: next_id = 1; int main() Player p1; Player p2; Player p3; cout << p1.getID() « ” “; cout << p2.getID() << ” “; cout << p3.getID(); return 0; O 131 0 123 O 111 0 222 What does the following declaration mean? int (*ptr)[10]; O ptr is an pointer to array O ptr is an array of 10 integers O ptr is array of pointers to 10 integers O ptr is a pointer to an array of 10 integers What will be the value stored in arr[5] when the following code is executed? #include<stdio.h> int cat_number(int n) int i, j, arr[n],k; arr[0] = 1; for(i = 1; i < n; i++) arr[i] = 0; for(j = 0, k = i – 1; j <i; j++,(–) arr[i] += arr[j] * arr[k]; return arr[n-1]; int main() { int ans, n = 10; ans = cat_number(n); printf(“%dn”, ans); return 0; O 14 Oo oo 132 O 42 Matrix A is of order 3*4 and Matrix B is of order 4*5. How many elements will be there in a matrix A*B multiplied recursively. O 15 O 12 0 20 O 16 Recursion is similar to which of the following? O Switch Case O If-else O Loop O if elif else Show transcribed image text What is function? O Function is the fundamental modular unit. A function is usually designed to perform a specific task. O All of the above O Function is a block of code that performs a specific task. It has a name and it is reusable. O Function is a block of statements that perform some specific task.
Determine Output. ——— — main() int i = abc(10); printf(“%d”, –i); int abc(int i) return(i++); O 11 O none of these 09 O 10
Which of the following functions calculate the Square of ‘x’ in C? O sqr(x) O power(x, 2) o pow(2,x) O pow(x, 2) O power(2,x)
char* myfunc(char *ptr) { ptr+=3; return(ptr); void main() char *x, *y; x = “EXAMVEDA”; y = myfunc(x); printf(“y=%s”, y); What will be printed when the sample code above in executed? O y=EXAMVEDA O y=MVEDA O y=EDA O y=VEDA O y=AMVEDA
What is a correct way to initialize array? O int n{} = {2, 4, 12,5, 45, 5 }; O int n{6} = {2,4, 12 }; O int n(6) = { 2, 4, 12, 5, 45, 5 }; O int num[6] = { 2, 4, 12, 5, 45, 5 };
Determine Output. ———————— #include int main(void) char p; char buf[10] = {1, 2, 3, 4, 5, 6, 9, 8}; p = (buf + 1) [5]; printf(“%d”, p); return 0; …………………———-……………… …………….————— — – 05 o o 06 O error O None of the above
Which of the following is C++ equivalent for scanf()? O cin o O input o O cout O print
What will be the output of the following C++ code? #include using namespace std; int x = 1; int main() { int x = 2; int x = 3; cout

Expert Answer


Answer to What is function? O Function is the fundamental modular unit. A function is usually designed to perform a specific task….

OR