The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+7 votes

A language with string manipulation facilities uses the following operations

head(s): first character of a string
tail(s): all but exclude the first character of a string
concat(s1, s2): s1s2

For the string "$acbc$" what will be the output of

concat(head(s), head(tail(tail(s))))
  1. $ac$
  2. $bc$
  3. $ab$
  4. $cc$
asked in Programming by Veteran (59.6k points)
edited by | 647 views
i think some correction is required in question
tail(s): all but the EXCLUDE first character of a string

1 Answer

+17 votes
Best answer

Answer is C.






answered by Boss (19.7k points)
edited by

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

40,845 questions
47,506 answers
62,261 users