Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8395503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:19:00+00:00 2026-06-09T20:19:00+00:00

My friend sent me a exercise that he can’t do: (C++) int main() {

  • 0

My friend sent me a exercise that he can’t do:
(C++)

int main()
{
    unsigned int x = 0xB0FF14a5;
    unsigned int y = 0x7340c00e;
    // enter code here
    if(x==0x7340c00e && y==0xB0FF14a5) victory();
    return 0;
}

The main goal is to run victory() function.
Assumptions:
-max 11 chars
-You can’t use: “main”, “victory”, “asm”, “&”, “*”, “(“, “/”
-You can use only one semicolon

I tried with #define and some other things, but nothing (I’m not C++ master) :/
I have no idea how to solve this; thanks for helping!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T20:19:02+00:00Added an answer on June 9, 2026 at 8:19 pm

    Use the XOR swap algorithm:

    x^=y^=x^=y;
    

    This is equivalent (usually, see below) to:

              //x==A,   y==B
    x ^= y;   //x==A^B, y==B
    y ^= x;   //x==A^B, y==A
    x ^= y;   //x==B,   y==A
    

    It works because XORing by the same number twice gives you the original number.

    In C++03 the single-expression version is undefined behavior so may not work correctly on all compilers/platforms. This is because there is no sequence point between modification and use of variables.

    In C++11, it is well-defined. The standard says (5.17.1):

    In all cases, the assignment is sequenced after the value computation of the right and left operands, and before the value computation of the assignment expression.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A friend sent me that code and alleges that it could damage the processor.
I was looking at some code a friend sent me, and he said: It
A friend of mine sent me this code snippet to celebrate his new baby
I want to Sign a application that my friend sent me for signing. The
I sniffed a bit when sent a message to a friend and found that
I've used sqlite before. My friend sent me a skeleton rails app that I
Hello my friend is currently development an application using SOA Architecture, He sent me
My friend and I were discussing the other day which style of code is
My friend gave me a database file: record.mdf . I copied that .mdf file
A friend show me this sample code to implement HTTP POST in C# and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.