Identify the output of below code snippet:
#include <stdio.h>
int main()
{
int i;
i = 25,
void *ptr = &i;
printf("%d\n", (int)*ptr);
return 0;
}
A
O segmentation fault
O Garbage value
O 25
O compile time error
Answers
Answered by
1
Answer:
operand of type 'void' where arithmetic or
pointer type is required
printf("%d\n", (int)*ptr);
Similar questions