Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

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 using namespace std; int x[100]; int main() cout 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 int cat_number(int n) int i, j, arr[n],k; arr[0] = 1; for(i = 1; i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions

Question

6. Have you used solid reasoning in your argument?

Answered: 1 week ago