Exams.RecruitmentIndia.in

A Learning Portal from Recruitment India

  • Home
  • Questions
    • Aptitude Questions
    • English Questions
    • Technical Questions
    • HR Interview Questions
    • Reasoning Questions
    • GK Questions
    • Current Affairs
    • Entrance Exams
  • IT Jobs By Location
    • Ahmedabad
    • Bangalore
    • Chandigarh
    • Chennai
    • Coimbatore
    • Delhi
    • Gurgaon
    • Hyderabad
    • Kolkata
    • Lucknow
    • Mumbai
    • Noida
    • Pune
    • Vizag
    • Vijaywada
  • Govt Jobs Portal
  • Online Tests Portal
  • Contact Us
New
Latest Private Jobs 2022 || Today Walkins || Latest Central Govt Jobs
New Recruitment India Job Notifications & Preparation Portal App || RecruitmentIndia Online Mock tests app
You are here: Home / Question and Answers

C Programming : Find the output

#include< stdio.h>
void i(int *a,int *b)
{
a=b;
*a=2;      }
int x=0,y=1;
int main()
{
i(&x,&y);
printf(“%d%d\n”,x,y);
return 0;
}

A. 

22

B. 

21

C. 

02

D. 

01

Answer
Workspace
Report
Discuss

Answer with explanation

Answer: Option C

Explanation

It begins from main I and j globally initialized by 0 and 1. So when we call function i(&x,&y) the address of x and y are passed. When a=b and *a=2 means *b=2, so value of *b is passed 2 and value of *b return to y and value of x and y as 2.
So printf(“%d%d\n”,x,y) give output (0,2)

Workspace

Discuss about the question Cancel reply

Search

State Wise Govt Jobs

  • Andhra Pradesh Govt Jobs
  • Arunachal Pradesh Govt Jobs
  • Assam Govt Jobs
  • Bihar Govt Jobs
  • Chattishgarh Govt Jobs
  • Goa Govt Jobs
  • Gujarat Govt Jobs
  • Haryana Govt Jobs
  • Himachal Pradesh Govt Jobs
  • Jammu and Kashmir Govt Jobs
  • Jharkhand Govt Jobs
  • Karnataka Govt Jobs
  • Kerala Govt Jobs
  • Madhya Pradesh Govt Jobs
  • Maharashtra Govt Jobs
  • Tripura Govt Jobs
  • Uttar Pradesh Govt Jobs
  • Uttarakhand Govt Jobs
  • Manipur Govt Jobs
  • Meghalaya Govt Jobs
  • Mizoram Govt Jobs
  • Nagaland Govt Jobs
  • Odisha Govt Jobs
  • Punjab Govt Jobs
  • Rajasthan Govt Jobs
  • Sikkim Govt Jobs
  • Tamilnadu Govt Jobs
  • Telangana Govt Jobs
  • West Bengal Govt Jobs

Advertisement

Useful Links

  • About Us
  • Privacy Policy
  • Disclaimer Policy
  • Contact Us

Our Android Applications

  • Preparation & Job Updates App
  • Download Online Mock Tests App

Copyright © 2016 -2022 Exams Recruitment India || Product from Recruitment India Made with ❤ in India.