A doubt in C Language

Write a C program which display error message on output screen when user password is less than 8 characters.

1 Like

#include <stdio.h>
#include <string.h>

int main()
{
char p[100];
int l;
printf(“Enter the password:\n”);
gets(p);

l=strlen(p);

if(l < 8)
printf("your password is less than eight charaters");

return 0;

}

hey I have problem in assignment -1 how to do that if I don’t know writing in c language
can you help me?

Why we call c language is a middle language ?

It’s so simple, you have to learn (recommended LearnVern) and then you will see the magic.

Why needed pointer ?

#include <stdio.h>

int main()
{
int a, b;

a=242;
b=15;

printf("a&b=%d\n",a&b);
printf("a-b=%d\n",a-b);
printf("a*b=%d\n",a*b);
printf("a/b=%d\n",a/b);
 
 return 0;

}
output=a||b=2
a-b=227
a*b=3630
a/b=16
why does the output is 2 when a is greater than b but the output is the same value if a is smaller than b?

hey I am a beginner can you tell me that why code is not running in terminal