CapitalIQ Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
0
of 0 vote

main()
{
int n;
cout<<"enter any number\n";
cin>>n;
if(n==strrev(n))
cout<<"the entered number is a palindrome\n";
else
cout<<"the given number is not a palindrome\n";
getch();
}

- suresh June 18, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

dude first look for what palidrome means then you will realize what you have posted here is useless.

- vikramjit singh August 01, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

checkPalindrome(char* str)
{

int n = strlen(str);
int flag;
char* strt = str;
char* end = str + n;

for(int i=0; i<n/2; i++)
{

if(*strt++ == end--)
flag = 1;

else {
flag = 0;
break;
}
}

if (flag == 1) printf("PALINDROME");

else printf("NOT A PALINDROME");

}

- vikramjit singh August 01, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

main()
{
char s[100];
printf("enter a string");
gets(s);
if(s==strrev(s))
printf("its a palindrome");
else
printf("dude its not..");
}

- lifewithc August 19, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

this would not work, u hv to use strcmp

- Anonymous December 21, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

this would not work, u hv to use strcmp

- Anonymous December 21, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

s == s[::-1] # I pyawned

- Bullocks December 29, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

WHATS THE LANGUAGE YOU ARE USING. PLEASE TELL.

- VIKRAMJIT SINGH August 01, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

its python

- pallav May 26, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Using perl

$string1= "pallindrome"
if($sstring1 eq reverse($string1)
{
print "strings are pallindrome";
}
else
{
print "not pallindrome";
}

- Smita August 29, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

using java---


class Palindrome
{
public static void main(String args[])
{
String string="madam";
String reverse=new StringBuffer(string).reverse().toString();
if(string.equals(reverse))
System.out.println("palindrome");
else
System.out.println("not a palindrome");
}
}

- Krishna Sai Mulpuri July 14, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

int isPalindrome(char* s,int l,int h)
{
        if(!*s) return 1;
        if(l>h) return 0;
        return l==h?1:(s[l]==s[h] && isPalindrome(s,l+1,h-1));
}
 
int main()
{
        char s[]="katak",size;
        size=sizeof(s)/sizeof(s[0]);
 
        if(isPalindrome(s,0,size-2)) printf("Palindrome");
        else printf("Not palindrome");
 
        return 0;
}

- Aashish July 14, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

public class Palindrome {

	public boolean isPalindrome(String s) {
		char[] input = s.toCharArray();
		int j = input.length - 1;
		for(int i = 0; i < input.length/2; i++) {
			if(input[i] != input[j]) {
				return false;
			}
			j--;
		}
		return true;

}}

- jasmine August 11, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

bool isPalindrome(string input)
{
	for(int i=0;i != input.size()/2; i++)
	{
		if(input[i] != input[input.size()-1-i])
			return false;
	}
	return true;
}

- Anonymous January 01, 2016 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

if($str eq reverse($str)){print "its a palindrome! loser. thanx to perl"}

- genehacker September 03, 2008 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More