Is it possible to print a name without using commas, double quotes,semi-colons?
Answers were Sorted based on User's Feedback
Answer / vinay
void main()
{
char s[30]=
{72,69,76,76,79,33,32,84,72,73,83,32,73,83,32,86,73,78,65,89,32,83,65,76,76,65};
if(printf(s));
getch();
}
| Is This Answer Correct ? | 7 Yes | 2 No |
Answer / vinay salla
Explanation for above solution:
The answer is based on the ascii values..
We can take the ascii values of the characters together in
one char array..
| Is This Answer Correct ? | 3 Yes | 2 No |
Answer / pavan_mustyala
int main(int argc, char* argv[])
{
if(putchar('n') && putchar('a') && putchar('m') &&
putchar('e'))
{
}
return 0;
}
| Is This Answer Correct ? | 3 Yes | 2 No |
Answer / saravanan
#include<stdio.h>
#define fun(x) #x
int main()
{
if(printf(fun(INDIA))){}
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / srsabariselvan
void main()
{
if(printf("www.sslogic.blogspot.com"))
{
}
}
| Is This Answer Correct ? | 2 Yes | 6 No |
Answer / amit rathi
main ()
{
if (printf (hello))
return 0;
}
//printf returns number of characters printed so if
condition turns true.
same can be done with while,shitch,etc.
| Is This Answer Correct ? | 14 Yes | 23 No |
int a=1; printf("%d %d %d",a++,a++,a); need o/p in 'c' and what explanation too
main() { char *p; p="Hello"; printf("%c\n",*&*p); }
main() { int i=400,j=300; printf("%d..%d"); }
main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 c. 1020 d. 1024
How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?
void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); }
enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }
Give a one-line C expression to test whether a number is a power of 2.
main() { int i=10,j=20; j = i, j?(i,j)?i:j:j; printf("%d %d",i,j); }
what will be the output of this program? void main() { int a[]={5,10,15}; int i=0,num; num=a[++i] + ++i +(++i); printf("%d",num); }
main ( ) { static char *s[ ] = {“black”, “white”, “yellow”, “violet”}; char **ptr[ ] = {s+3, s+2, s+1, s}, ***p; p = ptr; **++p; printf(“%s”,*--*++p + 3); }
why is printf("%d %d %d",i++,--i,i--);