+ 1

Please help me with this c program.

#include <stdio.h> int main() { char x[1000]; printf("enter your name: "); scanf("%d", &x); if (x == "Qasim") { printf("access granted"); } if (x == "John") { printf("access denied"); } return 0; } ------------------------------ I want to create a program that prints"access granted" when I enter "Qasim"and prints "access denied" when I enter "John" but the compiler doesn't show any result. Please help me in finding errors in this program.

24th Dec 2018, 9:27 AM
Qasim DX
Qasim DX - avatar
4 ответов
+ 2
Thank you Sir Jay Matthews for taking your time to answer my question.
24th Dec 2018, 11:32 AM
Qasim DX
Qasim DX - avatar
0
Sir Jay Matthews, It doesn't work. The above program is for C Programming Language.
24th Dec 2018, 9:39 AM
Qasim DX
Qasim DX - avatar
0
Actually I am new in Programming. So please explain every thing clearly. Thank you.
24th Dec 2018, 9:48 AM
Qasim DX
Qasim DX - avatar
0
Rewa Mathur, I think I don't reach THAT level to create this program. I'm at very initial stage of programming. I just completed basic concepts of c programming language. But thanks for your answer.
24th Dec 2018, 10:28 AM
Qasim DX
Qasim DX - avatar