Toggle navigation
Log in
Sign Up
Log in
Sign Up
Appium
C
C#
C++
Docker
Go
Informatica
Java
JavaScript
Kafka
Numpy
Oracle
Pandas
PHP
Py Spark
Python
R
React Native
Scipy
SFTP
Tableau
Teradata
TGMC
UNIX
Introducing
Radical.sh
Forget Code launches a powerful code generator for building API's
Forget_Code.Models.CategoryViewModel
Add a new snippet
Algorithms
13
Applications
5
Arithmetic Operations
2
Array
8
Basics
27
Compiler Design
1
Control Statements
4
Conversion Functions
1
Data Structures
12
Data Type
1
Date Functions
1
File
36
Keywords
1
Loops
1
Math Functions
30
Math Snippets
43
Memory Management
3
Misc
4
Networking
4
Operators
6
Pointers
17
String Functions
30
String Snippets
29
System Software
10
Utility Snippets
1
Choose Category
To Enter A hidden password Using getch() function in C
Forget Code
C
To Enter A hidden password Using getch() function
#include<stdio.h>
#include<string.h>
#include<conio.h>
void main()
{
char pw[10];
int x;
printf(" Enter password: ");
for (x = 0;x<10 ;x++)
{
// accepts the hidden password using the getch() function
pw[x] = getch();
printf("*"); // print the input chartered in the form of *
}
pw[x] = '\0';
printf( "\n" );
printf(" You have passed the hidden password: ");
for (x = 0; pw[x] != '\0'; x++)
{
printf("%c", pw[x]);
}
}
Contribute to Forget Code, help others.
Add snippet