+ 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.
5 Antworten
+ 2
Thank you Sir Jay Matthews for taking your time to answer my question.
0
Sir Jay Matthews, It doesn't work. The above program is for C Programming Language.
0
Actually I am new in Programming. So please explain every thing clearly. Thank you.
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.