Is it possible to print a name without using commas, double quotes,semi-colons?

Answers were Sorted based on User's Feedback



Is it possible to print a name without using commas, double quotes,semi-colons?..

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

Is it possible to print a name without using commas, double quotes,semi-colons?..

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

Is it possible to print a name without using commas, double quotes,semi-colons?..

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

Is it possible to print a name without using commas, double quotes,semi-colons?..

Answer / saravanan

#include<stdio.h>
#define fun(x) #x

int main()
{
if(printf(fun(INDIA))){}
}

Is This Answer Correct ?    1 Yes 0 No

Is it possible to print a name without using commas, double quotes,semi-colons?..

Answer / srsabariselvan

void main()
{
if(printf("www.sslogic.blogspot.com"))
{
}
}

Is This Answer Correct ?    2 Yes 6 No

Is it possible to print a name without using commas, double quotes,semi-colons?..

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

Is it possible to print a name without using commas, double quotes,semi-colons?..

Answer / ayub

yes it is possible the code as follow:


#include<stdio.h>
#include<conio.h>

void main()
{

if(printf(Ayub))

return 0;
getch();
}

Is This Answer Correct ?    5 Yes 15 No

Post New Answer

More C Code Interview Questions

main() { extern int i; i=20; printf("%d",sizeof(i)); }

2 Answers  


main(){ char a[100]; a[0]='a';a[1]]='b';a[2]='c';a[4]='d'; abc(a); } abc(char a[]){ a++; printf("%c",*a); a++; printf("%c",*a); }

2 Answers  


write a c program to input initial & final time in the format hh:mm and find the time intervel between them? Ex inputs are initial 06:30 final 00:05 and 23:22 final 22.30

0 Answers  


#include<stdio.h> #include<conio.h> void main() { int a=(1,2,3,(1,2,3,4); switch(a) { printf("ans:"); case 1: printf("1");break; case 2: printf("2");break; case 3: printf("1");break; case 4: printf("4");break; printf("end"); } getch(); }

0 Answers  


void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }

4 Answers  






What is the match merge ? compare data step match merge with proc sql merge - how many types are there ? data step vs proc sql

0 Answers  


union u { union u { int i; int j; }a[10]; int b[10]; }u; main() { printf("\n%d", sizeof(u)); printf(" %d", sizeof(u.a)); // printf("%d", sizeof(u.a[4].i)); } a. 4, 4, 4 b. 40, 4, 4 c. 1, 100, 1 d. 40 400 4

3 Answers   HCL,


hello sir,is there any function in C that can calculate number of digits in an int type variable,suppose:int a=123; 3 digits in a.what ll b answer?

6 Answers  


find A^B using Recursive function

2 Answers  


main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

2 Answers  


Derive expression for converting RGB color parameters to HSV values

1 Answers  


program to Reverse a linked list

12 Answers   Aricent, Microsoft, Ness Technologies,


Categories