getchar_unlocked() ফাংশনটি উইন্ডোজে ডিপ্রিকেটেড কারণ এটি getchar()-এর থ্রেড-অনসেফ ভার্সন। getchar_unlocked() ব্যবহার না করার পরামর্শ দেয়া হয়। কোনো স্ট্রিম লক চেক নেই সেজন্য getchar_unlocked অনসেফ। getchar_unlocked() ফাংশনটি getchar()-এর চেয়ে দ্রুত।
C ভাষায় getchar_unlocked()-এর সিনট্যাক্স:
int getchar_unlocked(void);
C-তে getchar_unlocked() প্রোগ্রাম:
উদাহরণ
#include <stdio.h>
int main() {
char val;
val = getchar_unlocked();
printf("Enter the character: \n");
printf("Entered character: %c", val);
return 0;
}
আউটপুট
Enter the character: a Entered character: a