Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1.)An array of char named student_name contains a C string. Write code to copy this C string into another array of char named search_name. 2.)

1.)An array of char named student_name contains a C string. Write code to copy this C string into another array of char named search_name.

2.)

Assume that we have the following C++ program:

#include  using namespace std; const int num = 10; int sum(int, int); int main() { int x = 3, y = 5; cout << sum(x, y) + num << endl; return 0; } int sum(int a, int b) { return (a + b); } 

What is the storage class of the variable num?

A.

automatic

B.

There's no such thing as storage class for a C++ variable.

C.

static

D.

dynamic

Assume that we have the following C++ program:

#include  using namespace std; const int num = 10; int sum(int, int); int main() { int x = 3, y = 5; cout << sum(x, y) + num << endl; return 0; } int sum(int a, int b) { return (a + b); } 

What is the storage class of the variable x?

A.

static

B.

There's no such thing as storage class for a C++ variable.

C.

dynamic

D.

automatic

Assume that we have the following C++ program:

#include  using namespace std; const int num = 10; int sum(int, int); int main() { int x = 3, y = 5; cout << sum(x, y) + num << endl; return 0; } int sum(int a, int b) { return (a + b); } 

What is the scope of the variable x?

A.

class scope

B.

file scope

C.

block scope

D.

function scope

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

Step: 3

blur-text-image

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

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

More Books

Students also viewed these Databases questions