answersLogoWhite

0


Best Answer

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

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

Wiki User

14y ago

//Printing word in reverse

import java.io.*;

class sss

{

void main()throws Exception

{

BufferedReader BR= new BufferedReader (new InputStreamReader(System.in));

System.out.println ("Enter String");

String inp= BR.readLine();

int l= inp.length();

char ch;

String rev="";

for(int i=l-1; i>=0; i--)

{

ch= inp.charAt(i);

res+=ch;

}

System.out.println("Reverse String= "+res);

}

}

}

}

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Check whether the string is palindrome or not without using library functions?
Write your answer...
Submit
Still have questions?
magnify glass
imp
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.


How to print float or double without using printf?

With functions like ecvt, fcvt, gcvt.

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 do you download from LimeWire library to mp3 without iTunes?

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


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 many 4 digits palindrome number can be divided by 7 without a remainder?

0.5714


What disease or problem encounter without the special functions of the bones?

what disease or problems we encounter without the special functions of the bones


What are the functions of web browser without the addition of plug-ins?

What are the functions of web browser without the addition of plug-ins?


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

sdfdg