Answer:
/*
* Program to write data to text file.
*/
#include<iostream>
#include<fstream>
#include<string.h>
using namespace std;
int main()
{
//Variable to name and age of a person.
string name;
int age;
cout<<"Enter your name"<<endl;
cin>>name;
cout<<"Enter your age"<<endl;
cin>>age;
//Creating object of ofstream.
ofstream file;
file.open ("outdata.txt");
//Writing data to file named outdata.txt
file<<name<<" "<<age;
file.close();
}
Output:
Enter your name
John
Enter your age
25
Content of Output.txt:
John 25
Explanation:
To write data to a file ofstream object is used. An ofstream object file is created first and then using this object a file named "outdata.txt" is created.
Finally using shift operator (<<), by means of operator overloading, name and age of person is transferred to file outdata.txt.
Answer:Sum functions() and Count functions() of logical test arguments used in formula .
Explanation:The Count () function returns the number of that rows match that a specified column.
Count (column_ Name)
table name
The count SQL Function finds the number condition.
SELECT COUNT(Condition Id)
FROM Condition;
The Sum () Function returns to the total sum number of columns.
SUM (Column_Name)
table name
The Sum SQL Function find the sum of the table.
<span>Random access memory.
This problem requires you to know what the different types of memory are and their relative advantages and disadvantages. Let's look at them and see why 3 are wrong and one is correct.
read-only memory: Otherwise known as ROM, this type of memory stores code that can't be over written. Used frequently for constant lookup values and boot code. Since it can't be written to by normal programs, it can't hold temporary values for Samantha. So this is the wrong choice.
random-access memory: Otherwise known as RAM, this type of memory is used to store temporary values and program code. It is quite fast to access and most the immediately required variables and program code is stored here. It can both be written to and read from. This is the correct answer.
hard disk: This is permanent long term readable and writable memory. It will retain its contents even while powered off. But accessing it is slow. Where the contents of RAM can be accessed in nanoseconds, hard disk takes milliseconds to seconds to access (millions to billions of times slower than RAM). Because it's slow, this is not the correct answer. But it's likely that Samantha will save her spreadsheet to hard disk when she's finished working with it so she can retrieve the spreadsheet later to work on again.
compact disk: This is sort of the ROM equivalent to the hard disk. The data stored on a compact disk can not be over written. One way of describing the storage on a compact disk is "Write Once, Read many times". In most cases it's even slower than the hard disk. But can be useful for archiving information or making backups of the data on your computer.</span>
"A Buffer overflow" vulnerability exploit resulted from the attacker's actions.
Whenever a software or an application writes too much data into a buffer, causing neighboring storage regions to have been corrupted as a consequence, this could be determined as Buffer overflow.
⇒ There are two kinds of Buffer overflow attacks such as:
- <u>Stack-based</u> - It will become more popular to use such memory, as well as that's only available during implementation of any code.
- <u>Heap-based</u> - Those attacks seem to be more difficult to execute because they entail overflowing overall storage capacity allotted for a program further than the space needed for something like the program's present activities.
Thus we can say that the correct answer is a Buffer overflow.
Learn more about Buffer overflow here:
brainly.com/question/4952591