answersLogoWhite

0

void main()
{ char a[30],b[30];
int i,j,f=1;
printf("\nEnter a string");
gets(a);
for(i=0;a[i]!=\0;i++);
for(j=0;i!=0;i--)
{ b[j++]=a[i];
}
b[j]=\0;
for(i=0;a[i]!=\0;i++)
{ if(a[i]!=b[i])
{ f=0;
break;
}
}
if(f==0)
printf("NOT PALINDROME");
else
printf("PALINDROME");
getch();
}
Syntax error may happen.

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

What is string library functions syntax?

String library function is one which is used to perform an operation in C-programming,without which library functions likestrlen(),strcp(),strcmp(),strdup(),strrev(),etc..,.can be performed


Write c program to print palindrome using string without using strrev strlen strcam?

sdfdg


What is the advantage of using functions and write a c program to explain about built-in functions with examples?

C does not have any built-in functions as such. The language allows the programmer to create functions or to include functions contained in external function libraries, but the language itself has no functions whatsoever. The C standard library is not considered built-in since programmers are free to ignore the standard library completely. However, the library contains highly efficient, optimised functions that are considered "general purpose" and therefore useful to the majority of programmers. The programmer can use these functions as the basis for more complex, more specialised functions. The main advantage of functions is that they allow programmers to break programs down into a series of simple subroutines, each of which is handled by a function. Functions can call other functions, including themselves, and can be called as often as required. Although some code duplication is inevitable in any program, by placing duplicate code in a function, the programmer ensures that the code remains consistent. Since the function code is in one place, it is much easier to maintain that code, there is no need to make multiple changes across all duplicates, which is error prone and could introduce inconsistencies. Also, with well-named functions, code becomes self-documenting, making it easier to express ideas in code without the need for verbose comments within the code itself, which tends to be distracting rather than helpful.


How do you write a C plus plus program that creates and manipulates a dynamic one dimensional array storing a string entered by user without using any C plus plus Standard functions?

In short you cannot, unless you provide a suitable alternative to the standard library yourself (in other words, reinvent the wheel). At the very least you will need to include the common runtime definitions (crtdefs.h) just to create a bare-bones program that does absolutely nothing, but you'll need to implement all the standard IO functions yourself. Even third-party replacements make extensive use of the standard library, so you're completely on your own here. The standard library exists so that you can draw upon a rich set of primitive but highly optimised, tried and tested functions which act as building blocks upon which you can create your own programs.


What is modularization in c plus plus?

Modular design is the process in which you take a large problem and break it down into smaller problems, and address each smaller problem individually. In terms of C programming, it would mean taking a large programming task and breaking it down into several smaller logically separate tasks. Each of these smaller tasks would most likely be represented as a function in the program.

Related Questions

What is string library functions syntax?

String library function is one which is used to perform an operation in C-programming,without which library functions likestrlen(),strcp(),strcmp(),strdup(),strrev(),etc..,.can be performed


Can you register your book with the Library of Congress without copyright privileges?

No, your book is copyrighted whether or not it is registered and whether or not you intend to enforce the copyright during your lifetime.


What is a palindrome for you see with it?

There cannot be a palindrome for that sentence, because palindromes are read the same way forwards and backwards, and cannot be made without changing the sentence. _____________ The palindrome you seek is eye.


What is a palindrome for a polite form of address?

Maam. Without the apostophe.


What 4 digits palindrome number can be divided by 7 without a remainder?

0.5714


What does the Dewey decimal do for your library?

The Dewey decimal system functions in many ways for a library. It is a way to organize the books by subject and number. It is also a quick way for a librarian or a patron to find the exact book they need without losing a lot of time.


How many 4 digits palindrome number can be divided by 7 without a remainder?

0.5714


Can you delete your LimeWire library without the same songs deleting off your itunes library?

Yes, you can delete your lime wire library without deleting it off your itunes library. The only way to delete it off your library is to delete from your library.


How do you download from LimeWire library to mp3 without iTunes?

How do you download from limewire library to mp3 without Itunes?


What is a palindrome for to peek or look inside something?

Ah, honey, a palindrome for "to peek or look inside something" is "peek." Yep, that's right, just flip it around and it's the same damn word. So go ahead, have a little fun with words and enjoy that simple little palindrome.


Write c program to print palindrome using string without using strrev strlen strcam?

sdfdg


What is a 1 step palindrome?

A "one step palindrome is "any number can be changed into a palindrome number by reversing the digits and adding to the original number" one time. For example, the number 23 can be turned into a palindrome in just one step: 23 + 32 = 55 The same goes for the number 12: 12 + 21 = 33