What will be the answer for this?
Please suggest the solution and explain why?
Code:
#include<stdio.h>
int strA = 1;
int *swappy(int *ptr);
void main(){
swappy(&strA);
}
int *swappy(int *ptr){
printf("\nThe value is: %d",*ptr);
*ptr++;
printf("\nThe value after post increment: %d",*ptr);
++*ptr;
printf("\nThe value after pre increment: %d",*ptr);
}
Comment