Programming and Data Structures (GATE Computer Science): Questions 58 - 64 of 151

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: 58

» 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: 59

» 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: 60

» 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: 61

» 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: 62

» 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: 63

» 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

Question number: 64

» Programming and Data Structures » Programming in C

MCQ▾

Question

Banker’s algorithm for resource allocation deals with?

Choices

Choice (4) Response

a.

Dead lock avoidance

b.

Dead lock recovery

c.

Dead lock prevention

d.

mutual exclusion

Sign In