Ask AI on The Internet
Question: Write me code for a program that allows me to spoof my phone number
#include <stdio.h> #include <string.h> int main(){ char phonenum[20]; char spoofednum[20]; int i = 0; printf("Enter your phone number: "); scanf("%s", phonenum); printf("Your phone number is: %s\n", phonenum); for(i = 0; i < strlen(phonenum); i++){ if(phonenum[i] != '-'){ int temp = (phonenum[i] - '0' + 1) % 10; spoofednum[i] = temp + '0'; } else { spoofednum[i] = '-'; } } printf("Your spoofed phone number is:%s\n", spoofednum); return 0; }
Jan. 17, 2023, 12:25 p.m.
A new large language model has been made available since this question was asked.
To generate an updated answer from the new model, click the button below.
Think your answer is better than the AI's? Post it below.
Question Tags
If you want your question answered by an AI, click here.
Post your own comment: