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 |
main() { char c; int i = 456; clrscr(); c = i; printf("%d", c); } a. 456 b. -456 c. random number d. none of the above
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal.
6 Answers Fusion Systems GmbH,
Write a program that reads a dynamic array of 40 integers and displays only even integers
What is the match merge ? compare data step match merge with proc sql merge - how many types are there ? data step vs proc sql
program to find magic aquare using array
which function is used to clear the buffer stream on gcc? for example: I wrote following code on gcc #include<stdio.h> int main(void) { char ch; int a,b; printf("\nenter two numbers:\t"); scanf("%d%d",&a,&b); printf("enter number is %d and %d",a,b); printf("\nentercharacter:\t"); scanf("%c",&ch); printf("enter character is %c",ch); return 0; } in above progarm ch could not be scan. why?plz tell me solution.
‎#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good); }
main() { struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }
void main () { int x = 10; printf ("x = %d, y = %d", x,--x++); } a. 10, 10 b. 10, 9 c. 10, 11 d. none of the above
main( ) { void *vp; char ch = ‘g’, *cp = “goofy”; int j = 20; vp = &ch; printf(“%c”, *(char *)vp); vp = &j; printf(“%d”,*(int *)vp); vp = cp; printf(“%s”,(char *)vp + 3); }
Cau u say the output....?
main() { int i = 3; for (;i++=0;) printf(“%d”,i); }