Q. Given a string S = "CARPE DIEM", If n is length/2 (length is the length of the given string),then what would following return?

(a)S[:n]

(b)S[n:]

(c)S[n:n]

(d)S[1:n]

(e)S[n:length:-1]


You can understand by Watching video :-



Answer :-

n = length/2
n = 5
(a) ‘CARPE’  
(b) ‘ DIEM’  
(c) ‘’
(d) ‘ARPE’
(e) Error

5 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post