Calling a function withing itself. Good practice?
/* * File: main.c * Author: Danstan * * Created on March 14, 2017, 11:06 AM */ #include <stdio.h> #include <stdlib.h> void login(void) { int token = 0; int loggin=0; char x; printf("Enter some text To Login\n"); scanf("%s",&x); while (1) { //login admin if (loggin == 1 && token == 1) { printf("You are logged in\n"); break; } else if (loggin == 0 || token == 0) { printf("Please Login\n"); login(); break; } else { printf("Please Login\n"); login(); break; } } } int main(int argc, char *argv[]) { login(); exit; }