A language with string manipulation facilities uses the following operations:…

GATE · 1995 · CS · Question 2 subparts

A language with string manipulation facilities uses the following operations: head(s): first character of a string; tail(s): all but the first character of a string; concat(s1,s2): s1 s2. For the string s = acbc, what will be the output of concat(head(s), head(tail(tail(s))))?

  1. A.

    ac

  2. B.

    bc

  3. C.

    ab

  4. D.

    cc

Attempted by 47 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…