ramu


{ City } hyderabad
< Country > india
* Profession * mca
User No # 81040
Total Questions Posted # 1
Total Answers Posted # 5

Total Answers Posted for My Questions # 13
Total Views for My Questions # 18736

Users Marked my Answers as Correct # 75
Users Marked my Answers as Wrong # 15
Questions / { ramu }
Questions Answers Category Views Company eMail

write a c program to add two integer numbers without using arithmetic operator +

Value Labs,

13 C 18736




Answers / { ramu }

Question { CNC, 8191 }

Write a program to find the given number is odd or even
without using any loops(if,for,do,while)


Answer

#include
int main()
{
int i;
printf("enter a number \n");
scanf("%d",i);
float f=i%2;
f==0 ? printf("given number is even") : printf("given
number is odd");
return 0;
}

Is This Answer Correct ?    3 Yes 1 No

Question { Aricent, 15480 }

How to check whether string is a palindrome, WITHOUT USING
STRING FUNCTIONS?


Answer

#include
void main()
{
char str[10]="liril";
int i,l,count=1;
printf("first find the string length as follow\n");
printf("\n\n");
for(l=0;str[l]!='\0';l++)
{
}
printf("length of the string %s is %d\n",str,l);
printf("\n\n");
for(i=0,l=l-1;l>=0;l--,i++)
{
if(str[i]!=str[l])
{
count++;
break;
}
}
if(count==1)
printf("given string is palindrom");
else
printf("given string is not palindrom");
}

Is This Answer Correct ?    20 Yes 4 No


Question { Accenture, 6526 }

how to write hello word without using semicolon at the end?


Answer

#include
int main(void)
{
if(printf("hello world"));
return 0;
}

Is This Answer Correct ?    4 Yes 4 No

Question { Accenture, 6526 }

how to write hello word without using semicolon at the end?


Answer

#include
void main()
{
if(printf("hello world"))
{
}
}

Is This Answer Correct ?    10 Yes 1 No

Question { Wipro, 5876 }

How to print %d in output


Answer

printf("%%d");

Is This Answer Correct ?    38 Yes 5 No