Assignment 7 July 2022 Solution
Assignment 7 July 2022 Solution
a) I
b) II
c) Both I and II
d) None
Solution: (b)
3. Which of the following function is more appropriate for reading in a multi word
string?
a) scanf()
b) gets()
c) printf()
d) puts()
Solution: (b)
Solution: 40
3[a] denotes the 4th element of the array.
a) Array
b) Array String
c) Array\0String
d) Compilation error
Solution:(a)
a) Programming
b) Language
c) ProgrammingLanguage
d) LanguageProgramming
Solution: (d)
Assignment 7 July 2022 Solution
a) assignment
b) tnemngissa
c) nothing will be printed
d) tttttttttt
Solution: (c) nothing will be printed as the string termination character ‘\0’ is assigned to first
element of array p[].
if(p==q)
{
printf("Two strings are equal");
}
return 0;
}
Solution: (c) No output, as we are comparing both base addresses and they are not same.