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
What is the problem with the following code segment? while ((fgets(receiving array,50,file_ptr)) != EOF) ;
main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }
29 Answers IBM, TCS, UGC NET, Wipro,
How can u say that a given point is in a triangle? 1. with the co-ordinates of the 3 vertices specified. 2. with only the co-ordinates of the top vertex given.
Is it possible to print a name without using commas, double quotes,semi-colons?
What is wrong with the following code? int *foo() { int *s = malloc(sizeof(int)100); assert(s != NULL); return s; }
void ( * abc( int, void ( *def) () ) ) ();
#include<stdio.h> main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s; printf("%d",s->x); printf("%s",s->name); }
void main() { int *mptr, *cptr; mptr = (int*)malloc(sizeof(int)); printf(“%d”,*mptr); int *cptr = (int*)calloc(sizeof(int),1); printf(“%d”,*cptr); }
main() { int i=-1; +i; printf("i = %d, +i = %d \n",i,+i); }
respected sir, i did my MCA in 2013 when i am going to attend to an interview i was asked about my project how will i explain my project could please help me in this and my project title is "Social Networking Site For Social Responsibility"
Program to find the largest sum of contiguous integers in the array. O(n)