1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | int main() { float a = 3.14; int b = 256; char *p, *p1; p = (char *) &a; p1 = (char *) &b; printf("\nFLOAT:"); printf("\nValue of *p=%f",*p); printf("\nValue of a=%f",a); printf("\nValue of *p=%f",*p); printf("\n\nINTEGER:"); printf("\nValue of *p1=%d",*p1); printf("\nValue of b=%d",b); printf("\nValue of *p1=%d",p1[1]); return 0; } |
ICAgIGludCBtYWluKCkKICAgIHsKICAgICBmbG9hdCBhID0gMy4xNDsKICAgICBpbnQgYiA9IDI1NjsKICAgICBjaGFyICpwLCAqcDE7CiAgICAgcCA9IChjaGFyICopICZhOwogICAgIHAxID0gKGNoYXIgKikgJmI7CiAgICAgcHJpbnRmKCJcbkZMT0FUOiIpOwogICAgIHByaW50ZigiXG5WYWx1ZSBvZiAqcD0lZiIsKnApOwogICAgIHByaW50ZigiXG5WYWx1ZSBvZiBhPSVmIixhKTsKICAgICBwcmludGYoIlxuVmFsdWUgb2YgKnA9JWYiLCpwKTsKICAgICBwcmludGYoIlxuXG5JTlRFR0VSOiIpOwogICAgIHByaW50ZigiXG5WYWx1ZSBvZiAqcDE9JWQiLCpwMSk7CiAgICAgcHJpbnRmKCJcblZhbHVlIG9mIGI9JWQiLGIpOwogICAgIHByaW50ZigiXG5WYWx1ZSBvZiAqcDE9JWQiLHAxWzFdKTsKICAgICAgcmV0dXJuIDA7CiAgICB9
-
upload with new input
-
result: Success time: 0.02s memory: 1676 kB returned value: 0
FLOAT: Value of *p=-0.060948 Value of a=3.140000 Value of *p=3.140001 INTEGER: Value of *p1=0 Value of b=256 Value of *p1=1


