Pre-Test
- a) What is a String in C Language.?
- Choose a correct statement about C String.
char ary[]="Hello..!"; - What is the Format specifier used to print a String or Character array in C Printf or Scanf function.?
- What is the output of C Program with Strings.?
- What is the output of C Program with Strings.?
String is a new Data Type in C
String is an array of Characters with null character as the last element of array.
String is an array of Characters with null character as the first element of array
String is an array of Integers with 0 as the last element of array.
Character array, ary is a string.
ary has no Null character at the end
String size is not mentioned
String can not contain special characters.
%c
%C
%s
%w
int main()
{
char ary[]="Discovery Channel";
printf("%s",ary);
return 0;
}
Discovery Channel
Discovery
Compile Error
int main()
{
char str[]={'g','l','o','b','e'};
printf("%s",str);
return 0;
}
globe
globe\0
D) None of the above
