syed fasi ahmed

Wednesday, 7 January 2015

change the value of the i without changing code of the main function, assign 20 to i ?

int fun() { //write a code here /* method 1 #define fun() i=20 */ //method 2 int j; int *ptr; ptr=&j; for (;*(ptr)!=10;ptr++); *ptr=20; } int main() { int i=10; fun(); //substitute i=20 printf("%d",i); }
Posted by Unknown at 19:53
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2018 (2)
    • ►  July (2)
  • ►  2017 (9)
    • ►  July (2)
    • ►  June (6)
    • ►  February (1)
  • ►  2016 (3)
    • ►  October (1)
    • ►  September (2)
  • ▼  2015 (19)
    • ►  February (12)
    • ▼  January (7)
      • Find the Binary Or in Strings using Java
      • Write a Program for Client and Server communicatio...
      • Write an algorithm to convert the given input stri...
      • Given a large array of unsigned ints, quickly find...
      • Illustrate with an example the difference between ...
      • change the value of the i without changing code of...
      • Find the unique number that is present only once i...
  • ►  2014 (14)
    • ►  December (1)
    • ►  November (2)
    • ►  October (7)
    • ►  September (4)
  • ►  2013 (12)
    • ►  December (2)
    • ►  August (1)
    • ►  April (3)
    • ►  February (2)
    • ►  January (4)
  • ►  2012 (8)
    • ►  December (4)
    • ►  November (3)
    • ►  October (1)

About Me

Unknown
View my complete profile
Picture Window theme. Powered by Blogger.