1 2 3 4 5 6
function strncpytest() ss="Ankit Raj"; nn=5; resu=strncpy(ss,nn); disp(resu); endfunction