Programming and Data Structures-Programming in C (GATE Computer Science): Questions 54 - 60 of 134

Get 1 year subscription: Access detailed explanations (illustrated with images and videos) to 913 questions. Access all new questions we will add tracking exam-pattern and syllabus changes. View Sample Explanation or View Features.

Rs. 450.00 or

Question number: 54

» Programming and Data Structures » Programming in C

MCQ▾

Question

The strategy of allowing processes that are logically runnable to be temporarily suspended is called

Choices

Choice (4) Response
a.

non preemptive scheduling

b.

first come first served

c.

shortest job first

d.

preemptive scheduling

Question number: 55

» Programming and Data Structures » Programming in C

MCQ▾

Question

What will be output if you will compile and execute the following c code?

  1. #include "string.hvoid main()
  2. {
  3.     clrscr();
  4.     printf("%d%d",sizeof("string"),strlen("string"));
  5.     getch();
  6. }

Choices

Choice (4) Response
a.

7, 7

b.

6, 8

c.

7, 6

d.

6, 7

Question number: 56

» Programming and Data Structures » Programming in C

MCQ▾

Question

Which of the following algorithm solves the all pair shortest path problem?

Choices

Choice (4) Response
a.

Warshall’s algorithm

b.

Floyd’s algorithm

c.

Dijkstra’s algorithm

d.

Prim’s algorithm

Question number: 57

» Programming and Data Structures » Programming in C

MCQ▾

Question

Which standard library function will you use to find the last occurance of a character in a string in C?

Choices

Choice (4) Response
a.

strrchar

b.

strncha

c.

strnchar ()

d.

strrchar ()

Question number: 58

» Programming and Data Structures » Programming in C

MCQ▾

Question

Does there any function exist to convert the int or float to a string?

Choices

Choice (4) Response
a.

either yes or no

b.

no

c.

yes

d. None of the above

Question number: 59

» Programming and Data Structures » Programming in C

MCQ▾

Question

To avoid the race condition, the number of processes that may be simultaneously inside their critical section is

Choices

Choice (4) Response
a.

1@

b.

4

c.

8

d.

0

Question number: 60

» Programming and Data Structures » Programming in C

MCQ▾

Question

The #ifndef directive tests to see whether ________

Choices

Choice (4) Response
a.

a variable has been given a value

b.

a class has no variable definitions

c.

a class has been defined

d.

any objects of the class have been instantiated

Sign In