GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

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

Consider the following code: x = 0;for i = 0:5 for j = 2:5 x…

Consider the following code: x = 0;for i = 0:5 for j = 2:5 x = x + 1; endend What is the value of x after the loop is executed?

Read Details

Suppose a textfile has been opened with read permission and…

Suppose a textfile has been opened with read permission and its identifier assigned to fid. Which of the following is NOT the correct way to read all characters from the file? You may not assume anything about the size of the file.

Read Details

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

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

Read Details

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

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

Read Details

Consider the following function: function ret = func1(n) ret…

Consider the following function: function ret = func1(n) ret = 0; if n

Read Details

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; end disp(“In a loop!”);end How many times does the message “In a loop!” gets printed?

Read Details

Posts pagination

Newer posts 1 … 43,463 43,464 43,465 43,466 43,467 … 63,934 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top