Answer:
void printC()
{
int i, j;
for (i = 0; i < 4; i++) //i indicate row number. Here we have 5 rows
{
printf("C"); //print C for every row
for (j = 0; j < 6; j++) //j indicate column number. Here we have 7 Rows
{
if (i == 0 || i == 4) //For first and last row
printf("C"); //print 'CCCCCCC'
else if (i = 1|| i= 3) //for Second forth row
printf("C + +"); //print 'C + +'
else if (i = 2) For second row
printf("C +++++"); //print 'C +++++'
else
continue; //to jump to next iteration
}
printf("\n"); // print in next line
}
}
Answer: Windows
Explanation:
ShellShock: Also called Bashdoor, it is a security bug which is found in the Bash shell of operating system e.g. Unix. It allows the hacker to execute scripts and commands by gaining unauthorized access. This affects many machines, devices that use Bash. Servers like web servers are most affected as most of them run Unix based OS like OS X. Most vulnerable are those who use Unix or Linux operating systems.
Microsoft Windows does not use Bash so it does not directly affect Windows os. For those who are using Windows PC, Windows phones and websites that are developed by MS software are non-vulnerable to ShellShock.
Answer:
The main method should simply terminate if the FileNotFoundException occurs.
Explanation:
Considering the full code snippet
snippet:public static void main(String[] args) throws FileNotFoundException
public static void main(String[])
represent the entry point method to a java main method
The addition of
throws FileNotFoundException
widens the scope of the main method to explicitly specifies that an exception named the FileNotFoundException may be thrown.
So, if any part of the code explicitly throws the FileNotFoundException the compiler makes use of this to throw an exception.
By throwing an exception, the main method is not catching any exceptions, instead it handles the FileNotFoundException by throwing it to the source which invoked the main method
This is required by the compiler to terminate the program if the FileNotFoundException occurs.