Should we use scanf?
Scanf can be clumsy in many cases. Others have faced similar difficulties as you: https://stackoverflow.com/questions/26478931/why-cant-i-use-scanf-on-the-same-variable-again-when-the-first-trail-fails
The main problem is that if scanf fails, it will try to read the same input (console) again. Since all of them fail, it just skips everything.
Your code fails as you try to read a string (e.g. a name) into an integral number (int). That's not gonna work. scanf fails.
What you need is to use the proper types for variables. In C strings are stored in char * (char pointer) or char[] (char array/buffer).
Now you can call code like
char name[20];
scanf("%s", name);
The problem with this is that name is limited to be 20 characters long maximum (including the terminating '\0').
You can look at this topic and see how others have solved the problem of getting an input:https://stackoverflow.com/questions/4023895/how-do-i-read-a-string-entered-by-the-user-in-c/4023921#4023921
So to give an answer: scanf can be used, but one should be aware of its limitations. It's always good idea to check the documentation too: http://www.cplusplus.com/reference/cstdio/scanf/
A Possible Fix
Now, with this knowledge I would fix your code like below:
#include <stdio.h>
int main ()
{
// You may need to change the buffer sizez to match your needs.
const size_t bufferSize = 100;
const size_t firstNameSize = 30;
const size_t lastNameSize = 30;
const size_t emailSize = 100;
const size_t passwordSize = 20;
char buffer[bufferSize];
char firstName[firstNameSize];
char lastName[lastNameSize];
char email[emailSize];
char password[passwordSize];
int choice = -1; // Set choice to be invalid
printf("_____________________________ | Welcome to AlphaComics | _____________________________\n");
printf("Do you have a account? (0 for No, 1 for Yes)\n");
do
{
printf("? ");
fgets(buffer, bufferSize, stdin);
sscanf(buffer, "%d", &choice);
} while (choice != 0 && choice != 1);
if (choice == 0)
{
printf("Next\n");
}
else if (choice == 1)
{
printf("Enter your first name: ");
scanf("%s", firstName);
printf("Entre your lastname: ");
scanf("%s", lastName);
printf("Enter your email: ");
scanf("%s", email);
printf("Entre your password: ");
scanf("%s", password);
printf("Hi %s %s.\n", firstName, lastName);
printf("Your email is: %s\n", email);
printf("Your password is: %s\n", password);
}
return 0;
}