CrazyEngineers
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Kaustubh Katdare

    AdministratorAug 6, 2013

    I added a better title to the question. I think you're asking about the output of this program, right? Why not just run it and check for yourself?
    Are you sure? This action cannot be undone.
    Cancel
  • rahul69

    MemberAug 10, 2013

    bhulaxmi
    main()
    {
    int *ptr=(int*)malloc(sizeof(int));
    *ptr=4;
    printf("%d",(*ptr)+++*ptr++);
    It will print 8,
    After the printf statement is executed, the pointer ptr had move to next address, and the value at earlier address is incremented (ie, becomes 5), if u still got any doubts, plz do share 😀
    Are you sure? This action cannot be undone.
    Cancel
  • Nayan Goenka

    MemberAug 10, 2013

    I think this program will generate output 10. Still working on it. Will give a definite output once I execute it on my side. But I guess you already know that this function is not just complete program. It needs prototypes or header files to run.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register