answersLogoWhite

0


Best Answer

/*------------------------------------------------------------------------

Section :G/7

M/c No.:32, Roll No.:11BT30015

Name :M A KRISHNA DEEPAK

Assignment No.: 08

Description: Program to implement functions on string characters.

------------------------------------------------------------------------*/

#include <stdio.h>

#define MAXLEN (1000+1)

int strLength(const char *x);

void strReverse(char *x);

int makeUpper(char *x);

char *strCopy(char *x, const char *y);

int isPrefix(const char *x, const char *y);

char *substring(char *x, const char *y);

int main()

{

int len ;

char x[MAXLEN], y[MAXLEN], z[MAXLEN], *cP;

printf("Enter the 1st string:\n") ;

scanf("%[^\n]", x) ;

printf("Enter the 2nd string:\n") ;

scanf(" %[^\n]", y) ;

printf("Length("%s") = %d\n",

x, len = strLength(x));

printf("Reverse("%s") = ", x);

strReverse(x) ;

printf(""%s"\n", x);

strReverse(x) ;

makeUpper(x);

printf("Upper-case: "%s"\n", x);

if(isPrefix(x, y))

printf(""%s" is a prefix of "%s"\n", y, x) ;

else

printf(""%s" is not a prefix of "%s"\n", y, x) ;

/*if((cP = substring(x, y)) == NULL)

printf(""%s" is not a substring of "%s"\n", y, x) ;

else {

printf(""%s" is a substring of "%s"", y, x) ;

printf(" from index %d\n", (int)(cP-x)) ;

}

*/

printf("z[] = "%s"\n", strCopy(z,x)) ;

return 0;

}

int strLength(const char *x)

{

static int sum=0;

int temp;

if(*x=='\0')

{

temp=sum;

sum=0;

return temp;

}

else

{

sum++;

return strLength(x=x+1);

}

}

void strReverse(char *x)

{

int length,c;

char *begin,*end,temp;

length=strLength(x);

begin=x;

end=x;

for(c=0;c<(length-1);c++)

end++;

for(c=0;c<length/2;c++)

{

temp=*end;

*end=*begin;

*begin=temp;

begin++;

end--;

}

}

int makeUpper(char *x)

{

static int u=0;

int temp;

if(*x=='\0')

{

temp=u;

u=0;

return temp;

}

else

{

if(*x>='a' && *x<='z')

{

*x-=32;

u++;

}

return makeUpper(x=x+1);

}

}

char *strCopy(char *x, const char *y)

{

char *p=x;

while(*y)

{

*x =*y;

y++;

x++;

}

*x ='\0';

return p;

}

int isPrefix(const char *x, const char *y)

{

static int l=strLength(y),p=0;

if(*y!=*x *y!='\0')

return 0;

if(*y==*x)

{

p+=isPrefix(x=x+1,y=y+1);

}

if(i==strLength(y))

return 1;

}

/*char *substring(char *x, const char *y)

{

}

*/

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

15y ago

Theres different materials for different types of bread. If you want to make simple bread just get a bread maker.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are used raw materials in baking industries?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Which southern industries used raw materials from the south after the civil war?

Raw materials were used by new southern Industries


State the raw materials used in chemical industries and their sources?

Most of raw materials are from petroleum deerived.


How did the souths use of raw materials change after the war?

Raw materials were used by new southern industries.


How did the south use raw materials change after the war?

Raw materials were used by new southern Industries


How did the south's use raw materials change after the war?

Raw materials were used by new southern Industries


How did the South use the raw materials change after the war?

Raw materials were used by new southern Industries


What are the raw material used by agro based industries?

Beverages used raw materials are cocoa


What type of economy is based on mining or producing raw materials to be used to foreign industries?

An industrial economy is based on mining or producing raw materials to be used in foreign industries.


What type of economy is based in mining or producing raw materials to be used in foreign industries?

An industrial economy is based on mining or producing raw materials to be used in foreign industries.


What type of economy is based on mining or producing raw materials to used in foreign industries?

An industrial economy is based on mining or producing raw materials to be used in foreign industries.


What type of economy is based on mining or producing raw materials to be used in foreign industries?

An industrial economy is based on mining or producing raw materials to be used in foreign industries.


How did the use of raw material change after the war?

Raw materials were used by new southern industries.