DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: What is the counterpart of this C pointer programme in C#?

  1. #1
    Join Date
    Mar 2009
    Posts
    68

    Question What is the counterpart of this C pointer programme in C#?

    I'd like to know how the following programme on pointer written in C can be written in C#, especially how to use the keywords in the C programme like &i and *p in C#. Please clarify.

    Code:
    #include <stdio.h>
    
    void f(int *p, int *q)
    {
    	p = q;
    	*p = 2;
    }
    
    int i = 0, j = 1;
    
    int main()
    {
    	f(&i, &j);
    	printf("%d %d \n", i, j);
    	return 0;
    }

  2. #2
    Join Date
    Jun 2021
    Posts
    3
    Maybe ask this question in developer's community? E.g. Stack Overflow

Similar Threads

  1. Programme Help - Input
    By aliz_khanz in forum C++
    Replies: 2
    Last Post: 04-01-2011, 01:33 PM
  2. Vb6 sybntax counterpart of VB.Net.
    By priyamtheone in forum VB Classic
    Replies: 5
    Last Post: 06-17-2010, 07:41 AM
  3. Yahtzee C++ programme help
    By kenneth_888 in forum C++
    Replies: 8
    Last Post: 09-05-2007, 04:01 AM
  4. regarding my MS_CS programme
    By george in forum Careers
    Replies: 0
    Last Post: 08-27-2001, 11:33 AM
  5. Replies: 1
    Last Post: 01-29-2001, 02:42 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center