/******************************************************************************
Online C Compiler.
Code, Compile, Run and Debug C program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <linux/types.h>
#include <stdint.h>
struct foo {
void *bar;
};
void test(struct foo *desc)
{
printf("value is:%u\n", *(uint32_t *)desc
->bar
); }
int main(int argc, char **argv)
{
struct foo desc = {};
uint32_t value = 5;
desc.bar = &value;
test(&desc);
return 0;
}
LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIE9ubGluZSBDIENvbXBpbGVyLgogICAgICAgICAgICAgICAgQ29kZSwgQ29tcGlsZSwgUnVuIGFuZCBEZWJ1ZyBDIHByb2dyYW0gb25saW5lLgpXcml0ZSB5b3VyIGNvZGUgaW4gdGhpcyBlZGl0b3IgYW5kIHByZXNzICJSdW4iIGJ1dHRvbiB0byBjb21waWxlIGFuZCBleGVjdXRlIGl0LgoKKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KCiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxsaW51eC90eXBlcy5oPgojaW5jbHVkZSA8c3RkaW50Lmg+CnN0cnVjdCBmb28gewogICAgdm9pZCAqYmFyOwp9OwoKdm9pZCB0ZXN0KHN0cnVjdCBmb28gKmRlc2MpCnsKICAgIHByaW50ZigidmFsdWUgaXM6JXVcbiIsICoodWludDMyX3QgKilkZXNjLT5iYXIpOwp9CmludCBtYWluKGludCBhcmdjLCBjaGFyICoqYXJndikKewogICAgc3RydWN0IGZvbyBkZXNjID0ge307CiAgICB1aW50MzJfdCB2YWx1ZSA9IDU7CiAgICAKICAgIGRlc2MuYmFyID0gJnZhbHVlOwogICAgdGVzdCgmZGVzYyk7CiAgICAKICAgIHJldHVybiAwOwp9