answersLogoWhite

0

#include<stdio.h>

#include<conio.h>

#include<string.h>

void main()

{

int i,flag=0,m;

char s[5][10]={"if","else","goto","continue","return"},st[10];

clrscr();

printf("\n enter the string");

gets(st);

for(i=0;i<5;i++)

{

m=strcmp(st,s[i]);

if(m==0)

flag=1;

}

if(flag==0)

printf("\n it is not keyword");

else

printf("\n it is a keyword");

getch();

}

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Why keyword cannot be used as an identifier in c language?

It's by design; this way the lexical parser is able to decide that any given string is a keyword or an identifier.


Could you write a assembly language program in tasm To check whether a given number present in a sequence of given memory location containing the string to be checked in 8086?

8086 assembly language program to check wether given number is perfect or not


Write a java program to count the space from the given line?

.... String line = "This is example program with spaces"; String[] tokens = line.split(" "); System.out.println(tokens.length-1); .......


Program to generate tokens from a given expression string?

a promlem to solve an equation or a assigment


Do I need to write a program to find a substring in a given string in c plus plus?

No.


What is an identifier. what are the hearing rods for identifier 'c' language?

An identifier is the names given for labels, functions and variables in the c language.


How to write A Java program to print number of digits in a given number?

One way to do this is to convert the number to a String, then use the corresponding String method to find out the length of the String.


Program to check that given string is palindrome or not in C?

/*To check whether a string is palindrome*/includeincludevoid main () { int i,j,f=0; char a[10]; clrscr (); gets(a); for (i=0;a[i]!='\0';i++) { } i--; for (j=0;a[j]!='\0';j++,i--) { if (a[i]!=a[j]) f=1; } if (f==0) printf("string is palindrome"); else printf("string is not palindrome"); getch (); }


How do you delete the given string in java programming?

You usually do not need to delete a String, since when the program no longer refers to it, the garbage collector will clean it up.


How do you write method pubic boolean containsString s Return whether the given string is in the array or not?

Return an iterator to the string if it exists, or the container's end iterator if it does not.


Write a program that stores vowels in an array When you program is given a character it should indicate whether the character is vowel or not?

That's easy to do!This script will get the POST data from an HTML form and check if it is a vowel.


Write a program to change the case of the given string?

This functionality is already in Java. String.toLowerCase() and String.toUpperCase() will take care of it for you.