0
Plz help me in Swaping two numbers using pointer # without any third variable
How to swap two numbers using pointer and without using third variable .
7 Respostas
+ 2
I got my mistake , thanks to every one... 🤗
0
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥
This code has error
#include <stdio.h>
int main() {
int num1,num2,*ptr1 = NULL,*ptr2 = NULL;
*ptr1 = &num1 ;
*ptr2 = &num2 ;
printf("Enter two number: ");
scanf("%d %d", &num1,&num2);
printf("%d", num1,num2);
printf("num1 = %d num2 = %d", *ptr1 ,*ptr2 );
return 0;
}
0
Can anyone tell me that what is the mistake in above code
0
uday kiran
Thanks
0
Roman J ok