GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

Consider the following code: for i = 10:15 disp(“In a loop!”…

Consider the following code: for i = 10:15 disp(“In a loop!”); if mod(i, 2) == 0 continue; else break; endend How many times does the message “In a loop!” gets printed?

Read Details

Suppose a textfile has been opened with write permission and…

Suppose a textfile has been opened with write permission and its identifier assigned to fid. Which of the following prints “Square root of 2 is 1.414214” to the file?

Read Details

Consider the following row array with random integer element…

Consider the following row array with random integer elements: myArray = randi(10, 1, 10); Which of the following statement that gives us a sub-array with all even-numbered element of myArray.

Read Details

Consider the following file and script. twoByTwo.txt: 1 2 3…

Consider the following file and script. twoByTwo.txt: 1 2 3 4 readTwoByTwo.m: fid = fopen(‘twoByTwo.txt’, ‘r’);x = fscanf(fid, ‘%d’, [2,2]); What is the value of x?

Read Details

Consider the following code: i = 0;while i < 5 i = i - 1;end...

Consider the following code: i = 0;while i < 5 i = i - 1;end How many times does this while-loop iterate?

Read Details

Consider the following statements: a = [1:3:10];a + 3;a(1) =…

Consider the following statements: a = [1:3:10];a + 3;a(1) = 5; What is the value of a?

Read Details

Suppose we wish to read a text file line by line from the be…

Suppose we wish to read a text file line by line from the beginning to the end. Which of the following is NOT a part of the process to accomplish this task?

Read Details

Suppose a textfile has been opened with write permission and…

Suppose a textfile has been opened with write permission and its identifier assigned to fid. Which of the following DOES NOT print “Square root of 2 is 1.414214” to the file?

Read Details

Which of the following if-statement prints the message”YAY!”…

Which of the following if-statement prints the message”YAY!” if x is odd and x is not equal to 1?

Read Details

Which of the following opens a file named ‘textfile.txt’ wit…

Which of the following opens a file named ‘textfile.txt’ with read permission and assign the file identifier to fid?

Read Details

Posts pagination

Newer posts 1 … 43,727 43,728 43,729 43,730 43,731 … 64,199 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top