Answer:
d.
for line in infile :
print(line)
Explanation:
for loop is used to iterate through the each line of the file using line variable. The file is accessed using the object infile. For example if the file name is "file.txt" and it is opened in read mode. It contains the following lines:
hi there friend
how are you
what are you doing
Then the above given chunk of code gives the following output
hi there friend
how are you
what are you doing
At each iteration each line of the the file is printed on the output screen. The print() method is used to display these lines in output.
<span>The Web version will work for this type of need. This version runs at a slightly lesser capability than the full version, but will still perform many of the advanced functions of SQL Server. The processor and RAM utilizations are a bit less than the maximum provided in other versions.</span>
Answer:
The description of the given code is given below:
Explanation:
Memory leak:
In a program, if memory is assigned to the pointer variables but that memory is already released previously then the condition of occurring the memory leakage.
Now the program :
#include <stdio.h> //header file
#include <stdlib.h> //header file
#include <string.h> //header file
int main() //main function
{
char *word1 = NULL; //line 1 (as given in the question)
word1 = malloc(sizeof(char) * 11); //line 2
free(word1); //free the memory of pointer word1 line 3
word1 = "bramble"; //line 4
char *word2 = NULL; //line 5
word2 = malloc(sizeof(char) * 11); //line 6
free(word2); //free the memory of pointer word2 line 7
word2 = word1; //line 8
return 0; //line 9
}
Therefore, line 3 is the first line that introduce a memory leak anf after that line 7 introduce it in a program.
// reading the value in response variable
cout<<"Enter the value :";
cin>>response;
// checking the value and printing the results
if(response == 'y' || response == 'Y')
{
yesCount+=1;
cout<<"YES WAS RECORDED";
}else if(response == 'n' || response == 'N')
{
noCount+=1;
cout<<"NO WAS RECORDED";
}else
cout<<INVALID";
Answer:
the answer is a network because the others are for different things