Answer:
Preprocessor directives are lines included in the code of programs preceded by a hash sign ( # ). ... The preprocessor examines the code before actual compilation of code begins and resolves all these directives before any code is actually generated
Answer:
#include<iostream>
#include <vector>
#include <list>
using namespace std;
int main(){
int a[10]={0,1,2,3, 4, 5, 6, 7, 8, 9 };
std::vector<int> v (&a[0],&a[0]+10);
std::list<int> l (&a[0],&a[0]+10);
int b[10];
for(int i=0;i<10;i++){
b[i]=a[i];
}
std::vector<int> v2(v);
std::list<int> l2(l);
for(int i=0;i<10;i++){
b[i]+=2;
}
for(int i=0;i<10;i++){
v2[i]+=3;
}
for (std::list<int>::iterator it = l2.begin(); it != l2.end(); it++)
*it=*it+5;
cout<<"Each containers value are: "<<endl;
cout<<"1st array: "<<endl;
for(int i=0;i<10;i++){
cout<<a[i]<<" ";
}
cout<<"\n 1st vector: \n";
for(int i=0;i<10;i++){
cout<<v[i]<<" ";
}
cout<<"\n 1st List is:\n";
for (std::list<int>::iterator it = l.begin(); it != l.end(); it++)
cout << *it << ' ';
cout<<"\n 2nd array: "<<endl;
for(int i=0;i<10;i++){
cout<<b[i]<<" ";
}
cout<<"\n 2nd vector:\n";
for(int i=0;i<10;i++){
cout<<v2[i]<<" ";
}
cout<<"\n 2nd list:\n";
for (std::list<int>::iterator it = l2.begin(); it != l2.end(); it++)
cout << *it << ' ';
return 0;
}
Explanation:
- Initialize an array, a vector and a list of type integer
.
- Create a 2nd array, vector, and list as a copy of the first array, vector, and list.
- Increase the value of each element in the array by 2
, vector by 3 and list by 5.
- Finally display the relevant results.
Answer:
Option(A) is the correct answer to the given question.
Explanation:
For the purpose of the security point of you we will disable the SSID broadcasting in the network because when the cellular computer is searching in the wireless communication area, the SSID of the network will be found this SSID communicates with the device like a router. So on disabling the SSID broadcasting is not detected.
- A security developer Disabling the activity of SSID broadcasting is done in the starting phase of implementation in the wireless network because we have to implement the security before informing the employee of the organization.
- All the other options are not suitable for the security purpose of wireless communication that's why they are incorrect options.
Answer:
An operating system is the most important software that runs on a computer. It manages the computer's memory and processes, as well as all of its software and hardware. It also allows you to communicate with the computer without knowing how to speak the computer's language.
Explanation:
Hope this helps :D
Answer:
ababababab
Explanation:
The code above is written in python and python uses indentation .So let me rephrase the code accordingly and explain what the code really do.
Note x and y is a global variable which can be used by any of the function declared. According to the question x and y are 2 and 3 respectively
The first block of code describes a function f1 without any argument but the code should return the string "ab"
def f1():
return "ab"
The second block of code defines a function f2 and returns the value of f1 multiply by x. This means you are multiplying the string "ab" by 2 which will be equals to abab
def f2():
return f1() * x
The third block of code declared a function f3 and returns the sum of f2 and product of f1 and y. using PEMDAS principle the multiplication aspect will be solved first so, ab × 3 = ababab, then we add it to f2 . ababab + abab = ababababab.
def f3():
return f2() + f1() * y
Finally, we print the function f3 value to get ababababab
print(f3())
If you run the code on your IDE like below you will get ababababab
x = 2
y = 3
def f1():
return "ab"
def f2():
return f1() * x
def f3():
return f2() + f1() * y
print(f3())