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
Continue with Google
or use


Have an account? Sign In Now

Sign In

Continue with Google
or use

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

Sorry, you do not have permission to ask a question, You must login to ask a question.

Continue with Google
or use

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.

Network Classmate Logo Network Classmate Logo
Sign InSign Up

Network Classmate

Network Classmate Navigation

  • Home
  • Article
  • Q&A
  • Guest Post
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Feed
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
Home/ Questions/Q 4972
Next
In Process
Vipin Chauhan
Vipin ChauhanLevel 30
Asked: February 3, 20222022-02-03T08:25:58+05:30 2022-02-03T08:25:58+05:30

What Will Be The Values Of Ans, X, And Y After The Following Statements Are Executed?

What Will Be The Values Of Ans, X, And Y After The Following Statements Are Executed?
  • 0
  • 1 1 Answer
  • 11 Views
  • 0 Followers
Answer
Share
  • Facebook

    Related Questions

    • What Do You Mean By Https?
    • How To Check TLS Version On Aix Server?
    • How To Change Permissions For Entire Directory In Linux?
    • What Does The Tracert Command Do?
    • How To Connect Uverse Receiver To Wifi?

    1 Answer

    • Voted
    • Oldest
    • Recent
    1. Maryam Khalid Bronze
      2022-03-31T23:37:06+05:30Added an answer on March 31, 2022 at 11:37 pm

      What Will Be the Values of Ans, X, And Y After the Following Statements Are Executed? 

      Int Ans = 35, X = 50, Y = 50;

       If (X >= Y) 

      Ans = X + 10; X -= Y; 

      Else Ans = Y + 10;

       Y += X; 

      • Ans = 60, X = 0, Y = 50 
      • Ans = 35, X = 60, Y = 10
      • Ans = 55, X = 80, Y = 40 
      • Ans = 115, X = 65, Y = 90

      Answer: The value of the Ans, X, and Y after the statement is executed is Ans=60, X=0, and Y=50.

      The codes in the programs are the set of instructions given by the users. The instructions given for the codes are different like subtracting the numbers or heck if the value is equal to some condition. The instructions are stored in the form of bytes. as CPU executes 2 billion operations in a second it means the 2 billion codes are executed in the second.

      The programs are the combination of the codes which are in bulk amounts. Such as the Firefox is built for the instruction that can add more than two numbers it is difficult to believe but it’s the fact. The programs work when the CPU executes the instruction with the help of the: fetch-execute” cycle. Instructions come in a sequence toward the CPU, they are executed and then the next instruction is executed and the cycle starts. Some lines in the instruction become the reason to distort the order of the CPU. Sometimes there might be an instruction that allows the CPU to move back to the initiation point or to skip the instruction and move to the other one if the given statement is true, and the IF statement work in the scenario. The collection of the machine code makes the programs

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

    You must login to add an answer.

    Continue with Google
    or use

    Forgot Password?

    Need An Account, Sign Up Here

    Sidebar

    Top Members

    Shailendra Yadav

    Shailendra Yadav

    • 2k Questions
    • 52k Points
    Level 50
    Sneha Singh

    Sneha Singh

    • 2k Questions
    • 41k Points
    Level 40
    Nilay Sharma

    Nilay Sharma

    • 0 Questions
    • 33k Points
    Level 30
    • Popular
    • Comments
    • Farwa Khalid

      Half Duplex Versus Full Duplex

      • 3 Comments
    • Farwa Khalid

      What Is Split Horizon

      • 0 Comments
    • Farwa Khalid

      What Is Ping Spoofing

      • 0 Comments
    • Farwa Khalid

      What Is Wireless Isolation?

      • 0 Comments
    • Farwa Khalid

      What Is Radio Network Controller?

      • 0 Comments
    • What is Circuit Switching - Network Classmate
      What is Circuit Switching - Network Classmate added a comment […] needs to be established. It is additive into two… November 30, 2022 at 11:36 am
    • Difference Between Router And Switch - Network Classmate
      Difference Between Router And Switch - Network Classmate added a comment […] router works in the full-duplex transmission mode. However, we… November 30, 2022 at 11:36 am
    • Communication Protocols - Network Classmate
      Communication Protocols - Network Classmate added a comment […] receiver. It is two wired protocols. Rx and Tx… November 30, 2022 at 11:35 am

    • Home
    • Groups page
    • Communities
    • Questions
      • New Questions
      • Trending Questions
      • Must read Questions
      • Hot Questions
    • Polls
    • Tags
    • Badges




    Footer

    Important Links

    • Home
    • Article
    • Q&A
    • Guest Post

    Useful Categories

    • Basic Networking
    • Basic Security
    • CCNA R & S
    • CCNA Security
    • Download

    Legal Stuff

    • About Us
    • Contact Us
    • Privacy Policy
    • Terms of Service
    • User Data Policy

    Social Links

    • Facebook
    • Instagram
    • Twitter
    • Telegram
    • Linkedin

    Copyrights © 2023 Network Classmate™. All Rights Reserved.
    Designed by LeadsNut

    Manage Cookie Consent
    To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
    Functional Always active
    The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
    Preferences
    The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
    Statistics
    The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
    Marketing
    The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
    Manage options Manage services Manage vendors Read more about these purposes
    View preferences
    {title} {title} {title}