Arrays and Strings – Multiple Choice Questions (MCQs)
-
-
26. What does the `strcmp()` function return if the first string is lexicographically greater than the second?
-
27. What does the `strcmp()` function return if the first string is lexicographically smaller than the second?
-
28. What is the purpose of the `strncat()` function?
-
29. What is the purpose of the `strncpy()` function?
-
30. What is the purpose of the `strchr()` function?
-
31. What is the purpose of the `strstr()` function?
-
32. Can you pass an entire array as an argument to a function in C?
-
33. When you pass an array to a function in C, what is actually passed?
-
34. What is the difference between passing an array by value and by reference to a function in C?
-
35. What is a pointer to an array in C?
-
36. How do you declare a pointer to an integer array of size 5 in C?