Pointers

Q1: Which of the statements is correct about the program?
#include<stdio.h>

int main()
{
    float a=3.14;
    char *j;
    j = (char*)&a;
    printf("%d\n", *j);
    return 0;
}

A It prints ASCII value of the binary number present in the first byte of a float variable a.

B It prints character equivalent of the binary number present in the first byte of a float variable a.

C It will print 3

D It will print a garbage value

ANS:A - It prints ASCII value of the binary number present in the first byte of a float variable a.

No answer description is available. Let's discuss.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.