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)


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 can you use just basic to write a program?

You can use BASIC to write a program by leveraging its straightforward syntax and commands to perform tasks like input, output, and simple arithmetic operations. Start by defining your program with a clear structure, using commands like PRINT for output and INPUT for user interaction. Utilize loops and conditionals to control the flow of the program, and keep the code organized with comments for clarity. BASIC's simplicity makes it an excellent choice for beginners to grasp programming concepts effectively.


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

a = b = c


How do you write a program to performs all airthematic operation between two matrixs using array?

To write a program that performs arithmetic operations between two matrices using arrays, first define two 2D arrays to represent the matrices. Then, create functions for each arithmetic operation (addition, subtraction, multiplication, etc.) that iterate through the elements of the matrices, performing the operation element-wise. Ensure to handle cases where the matrices have different dimensions, as this would affect the validity of the operations. Finally, print the result matrix after each operation.