answersLogoWhite

0

#include <stdio.h>

#include <stdlib.h>

main(){

int x, *p;

p = &x; /* initialise pointer */

*p = 0; /* set x to zero */

printf("x is %d\n", x);

printf("*p is %d\n", *p);

*p += 1; /* increment what p points to */

printf("x is %d\n", x);

(*p)++; /* increment what p points to */

printf("x is %d\n", x);

exit(EXIT_SUCCESS);

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is algorithm to write algorithm to the program to access a pointer variable in structure?

Here is the algorithm of the algorithm to write an algorithm to access a pointer in a variable. Algorithmically.name_of_the_structure dot name_of_the _field,eg:mystruct.pointerfield


You want to write a simple without using pointer or array c program which will print greatest number when you give 20 number?

i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?


Write a program in C for arithmetic operations between two integers your program should guide users with proper message or menu on the console?

Write a program in C for showing working of different logical operator in C.Your program should guide users with proper message/menu on the console. (5 Marks)


Pointer is a variable holding a memory address?

pointer is a derived datatype which contains memory addresses as their values. program:- #include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { int m=5,*p; clrscr(); p=&amp;m; printf("address of variable m is %p",(void *)p); }


How do you write a program that calculates the sum of the matrix elements given numbers?

ring me and ill explain - 086 22222222222222227 ring me


How you can write an account of prime numbers in arithmetic progressions?

There is no simple answer because there is no simple rule for primes: it is certainly NOT an arithmetic progression.


How would you write a program to swap the values of character variable using call by address?

void swap (int* a, int* b) { if (!a !b) return; // can't swap a pointer to null *a^=*b^=*a^=*b; }


Write down the equivalent pointer expression for referring the same element aijkl?

it is a[i][j][k][l]; so in pointer reference: *(*(*(*(*(a+i)+j))+k)+l)


How do you write a arithmetic operations in c using compound assignment statement?

a = b = c


Write a program to read through an array of any type using pointer Write a C program to scan through this array to find a particular value?

for (int i = 0; i &lt; myArray.length(); i++) System.out.println(myArray[i]);


How to write program for secant method in mathematica?

How to write a program for secant method by mathematica


What is the Th term of the arithmetic sequence given by the explicit rule?

The answer depends on what the explicit rule is!