${stra:-word }
${stra:=word }
${stra: +word }
${stra: ?word }
第1题:
在Shell变量引用操作符可实现模式匹配替换其中()用来的含义是若pattern匹配变量stra的头部,则删除最长匹配部分并返回剩余部分。
A.${strapattern}
B.${strapattern}
C.${stra%pattern}
D.${stra%%pattern}
第2题:
变量未赋值时,数值型变量的值为______,字符串变量的值为空串。
第3题:
在Shell变量引用操作符可实现字符串替换其中()用来测试如果变量stra存在且不为空,则返回为word,否则返回为空串
A.${stra:-word}
B.${stra:=word}
C.${stra:+word}
D.${stra:?word}
第4题:
变量未赋值时,数值型变量的值为().(字符串变量的值为空串)
A:0
B:空
C:1
D:无任何值
第5题:
A.如果变量不存在,返回false
B.如果变量存在且值为null返回false
C.如果变量存在且值不为null返回false
D.以上说法都正确
第6题:
编写一个用户自定义函数SGN(),当自变量为正数时,返回1;当自变量为负数时,返回 -1;当自变量为零时,返回0。
第7题:
下列程序判断字符串s是否对称,对称则返回1,否则返回0;如f("abba")返回1,f("abab")返回0。
第8题:
在Shell变量引用操作符可实现字符串替换其中()用来测试,如果变量stra存在,则返回为变量stra的值,否则输出为word,并退出当前脚本程序
A.${stra-word}
B.${stra=word}
C.${stra:+word}
D.${stra:?word}
第9题:
变量未赋值时,数值型变量的值为0,字符串变量的值为
A.False
B.空串" "
C.Null
D.没任何值
第10题:
Session变量和Application变量的返回值的数据子类型是()。