Is the following program correct? if so What will be the output? If not why?
1. #include <stdio.h>
2. int main()
3. {
4. void *p;
5. int a[4] = {1, 2, 5, 8};
6. p = &a[3];
7. int *ptr = &a[2];
8. int n = p - ptr;
9. printf("%d\n", n);
10. }
Answers
Answered by
3
Explanation:
include <stdio. h> void main() {float a=0.7; if (a<0.7) printf("1"); else printf("2");} The output of the above program is-1.
Similar questions
Computer Science,
15 days ago
Physics,
15 days ago
Physics,
1 month ago
English,
1 month ago
Math,
8 months ago