UrbanPro

Learn C Language from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

How can I create a login system in C?

Asked by Last Modified  

Follow 0
Answer

Please enter your answer

You can download the videos from Youtube
Comments

main() { int i,counter=0,flag=0; char uid,pwd,s_uid={"11user1","12user2","13user3"}; char s_pwd={"Pwd1","Pwd2","Pwd3"},ch='a';/*dummy character in ch */ clrscr(); printf("\n Enter the user id : "); scanf("%s",uid); printf("\n Enter the password : "); i=0; while(1) { ch=getch(); if(ch==13) break; else...
read more
main() { int i,counter=0,flag=0; char uid[25],pwd[25],s_uid[][25]={"11user1","12user2","13user3"}; char s_pwd[][25]={"Pwd1","Pwd2","Pwd3"},ch='a';/*dummy character in ch */ clrscr(); printf("\n Enter the user id : "); scanf("%s",uid); printf("\n Enter the password : "); i=0; while(1) { ch=getch(); if(ch==13) break; else if(ch==8) { if(i!=0) /*this is for avoiding the ENTER instructions getting deleted */ { printf("\b"); /*printing backspace to move cursor 1 pos back*/ printf("%c",32);/*making the char invisible which is already on console*/ printf("\b"); /*printing backspace to move cursor 1 pos back*/ i--; pwd[i]='\0'; } else continue; } else { putchar('*');/* char - '*' will be printed instead of the character */ pwd[i]=ch; i++; } } pwd[i]='\0'; for(i=0;i<=2;i++) { if((stricmp(uid,s_uid[i]))==0 && (strcmp(pwd,s_pwd[i]))==0) { flag=1; break; } } if(flag) printf(" \n \n \t \t USER AUTHENTICATED "); else printf("\n \n \n\t TRESSPASSERS WILL BE SHOT AND SURVIVORS WILL BE SHOT AGAIN .. ha ha :)"); printf("written by dileep basam .. [snipped email]"); getch(); } read less
Comments

Related Questions

Can you define which header file to include at compile time?
Yes we can do it by using conditional comilation
Thileshwari
0 0
5
Which are the best books to learn C?
- Yashwant Kanetkar - E Balagurusamy
Kratika
Why is C programming language called C?
It was first known as New B as it was an improved version of the B programming language. As C comes next to B in the English alphabet, it was renamed C later before its release. C is the only programming...
Shiva
0 0
5
What is the difference between a string and an array?
An array is an array of anything. A string is a specific kind of an array with a well-known convention to determine its length. There are two kinds of programming languages: those in which a string is...
Rakes

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Efficient Learning Strategies
Type your notes after class Write your notes onto flashcards - Scrabble -Make posters Review flashcards while walking, at gym, etc. Dog-ear pages in the reading where you can find...

Why C is a Language and not a database?
When I interviewed a candidate, I raised this question many times, but I have not got the answer correctly. To under why C is a language and not a database, it is good to understand why our communication...

C for Begginers
C is an procedure oriented programming language. For any begginer the word program is new. Program: Set of instructions to be followed by machine or computer. Instruction Examples: Arithmetic instruction...

Compiler vs Interpreter
Compiler Interpreter Convert all the code into binary format and execute. Convert one statement at a time and execute, then Convert next statement and execute. After conversion, source...

Facts about C language
C programming language was developed in 1972 by Dennis Ritchie at AT&T Bell Labs. It was developed to overcome the problems of languages such as B, BPCL. It was developed to write the Unix operating...

Recommended Articles

Lasya Infotech is a Hyderabad based IT training institute founded in 2016 by O Venkat. Believing in his innovation, passion and persistence and with a diverse blend of experience, he started his brainchild to deliver exemplary professional courses to aspiring candidates by honing their skills. Ever since the institute envisions...

Read full article >

Brilliant Academy is one of the reputed institutes for B.Tech tuition classes. This institute is specialised in delivering quality tuition classes for B.E, Engineering - all streams and Engineering diploma courses. Incorporated in 2012, Brillant Academy is a brainchild of Mr Jagadeesh. The main motto of the academy is to...

Read full article >

Business Process outsourcing (BPO) services can be considered as a kind of outsourcing which involves subletting of specific functions associated with any business to a third party service provider. BPO is usually administered as a cost-saving procedure for functions which an organization needs but does not rely upon to...

Read full article >

Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...

Read full article >

Looking for C Language Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for C Language Classes?

The best tutors for C Language Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn C Language with the Best Tutors

The best Tutors for C Language Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more