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 not; not=!2; printf("%d",not); }
#include<stdio.h> int main() { int x=2,y; y=++x*x++*++x; printf("%d",y); } Output for this program is 64. can you explain how this output is come??
const int perplexed = 2; #define perplexed 3 main() { #ifdef perplexed #undef perplexed #define perplexed 4 #endif printf("%d",perplexed); } a. 0 b. 2 c. 4 d. none of the above
#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }
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); }
Write a routine to implement the polymarker function
¦void main() ¦{ ¦int i=10,j; ¦ j=i+++i+++i; ¦printf("%d",j); ¦getch(); ¦} ¦ output:-30 but in same question if we write as- ¦void main() ¦{ ¦int i=10; ¦ int j=i+++i+++i; ¦printf("%d",j); ¦getch(); ¦} ¦ output:-33 why output is changed from 30 to 33. Can any body answer...
programming in c lanugaue programm will errror error with two header file one as stdio.h and other one is conio.h
Print an integer using only putchar. Try doing it without using extra storage.
Is this code legal? int *ptr; ptr = (int *) 0x400;
main() { printf("\nab"); printf("\bsi"); printf("\rha"); }
main() { char a[4]="HELL"; printf("%s",a); }