answersLogoWhite

0

#include<stdio.h>

#include<conio.h>

#include<string.h>

void main()

{

char a[8];int s,i,flag=0,loc1=0,loc2=0,j;

clrscr();

printf("Enter any string\n");

gets(a);

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

{

int ch=a[i];

if(ch!=32)

{ loc2=i;

flag++;

}

if(ch==32)

{ s=flag; flag=0;

switch(s)

{

case 2:

if(a[loc1]=='i' && a[loc2]=='f')

printf("STRING HAS if AS A KEYWORD");

break;

case 3:

if(a[loc1]=='f' && a[loc1+1]=='o' && a[loc2]=='r')

printf("STRING HAS for AS A KEYWORD");

break;

default:

printf("not our case");

}

}

}

getch();

}

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering
Related Questions

What has the author William P Albritton written?

William P. Albritton has written: 'Guidance and control systems simulation and validation techniques' -- subject(s): Missile control, Control simulation, Digital simulation


What is process control simulator?

The simulation of physical processes represents a modern and efficient direction for multifunctional testing platforms. This paper will present a Process Control Simulator and its applications in system simulation. The Process Control Simulator can be used for students training as well as for the conception, simulation and improvement of control schemes in modern technologies. The simulation of industrial processes reduces the cost and the amount of time needed for deploying the system. The various types of applications, with different complexity factors, are associated with several functional masks. The Process Control Simulator uses a simulation block and a microcontroller for all the applications with different replaceable masks according to the desired application.


Electronic Instrumentation for measurement and control analog computing and simulation?

electronics instruments


What is a control statement?

The controlling statement controls the writing you will do


What do most bulimics recognize about their condition?

Many typically recognize that the behavior is not normal, but feel out of control.


How does an automata work?

An automaton is a self-operating machine or control mechanism designed to automatically follow a predetermined sequence of operations. It typically works by following a set of defined rules or instructions to process input data and produce output based on those rules. Automata are commonly used in various fields such as computing, robotics, and industrial control systems to perform tasks efficiently and autonomously.


What does the automata skill do in the Deepworld game?

The automata skill in Deepworld enables you to build defensive turrets and butler bots.Depending on your skill level, it also increases your butler bot's battery and grants you better butler bot commands.At level 5 you can control onyx butler bots.At level 6 onwards you can control more than one butler bot, to a maximum of 4.


What is the abbreviatIon of 'SIM'?

What is the abbreviation of sim?


What is difference between control statements and looping statements in c language?

differance between control statement and looping statement?


What statement about control group is false?

the control group is recieving the medication


How is finite state automata used in computer science?

They are used to make state machines that control sequences of operations: e.g. syntax parsing, communication protocols, user interfaces.


What has the author Aporn Ratanaruang written?

Aporn Ratanaruang has written: 'Digital computer simulation for surface ship control'