Question
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
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
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started