Module-3: 4. What Will Be The Output of The Program ?
Module-3: 4. What Will Be The Output of The Program ?
Module-3: 4. What Will Be The Output of The Program ?
Answer: c
Answer: d
Answer: a
int main()
{
int a[5] = {5, 1, 15, 20, 25};
int i, j, m;
i = ++a[1];
j = a[1]++;
m = a[i++];
printf("%d, %d, %d", i, j, m);
return 0;
}
A. 2, 1, 15
B. 1, 2, 5
C. 3, 2, 15
D. 2, 3, 20
Answer: Option C
5. Is there any difference int the following declarations?
int fun(int arr[]);
int fun(int arr[2]);
A. Yes
B. No
Answer: Option B
1. #include <stdio.h>
2. int main()
3. {
4. char *str = "hello, world";
5. char *str1 = "hello, world";
6. if (strcmp(str, str1))
7. printf("equal");
8. else
9. printf("unequal");
10. }
a)equal
b) unequal
c)Compilation error
d) Depends on the compiler
Answer: b
Answer: c
10.What is the header file used to call String handling functions?
a)math.h
b)string.h
c)stdio.h
d)stdlib.h
Answer:b