print a semicolon using Cprogram without using a semicolon
any where in the C code in ur program!!
Answers were Sorted based on User's Feedback
Answer / arunabha
#include<stdio.h>
#include<conio.h>
void main()
{
if(printf("%c",59)){}
if(getch()){}
}
this is the perfect solution...
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / rahul
void main()
{
if(printf("%c",59))
{}
if(getch())
}
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / poorna
#include<stdio.h>
void main()
{
if(printf("\n welcome \n"))
}
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / neeraj gupta
#include<stdio.h>
void main()
{
printf("%c",59);
}
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / abinash
void main()
{
if(printf("semicolon")){}
}
this works,if u include (stdio.h)
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / gaurav sharma
void main()
{
if(printf("%c",59))
{}
if(getch())
}
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sam prasanna
we can use the ASCII value of semicolon(;) to print it in if condition.
Is This Answer Correct ? | 0 Yes | 0 No |
posted by surbhi just now main() { float a = 5.375; char *p; int i; p=(char*)&a; for(i=0;i<=3;i++) printf("%02x",(unsigned char) p[i]); } how is the output of this program is :: 0000ac40 please let me know y this output has come
main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }
main() { char s[ ]="man"; int i; for(i=0;s[ i ];i++) printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]); }
main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }
Which one is taking more time and why ? :/home/amaresh/Testing# cat time.c //#include <stdio.h> #define EOF -1 int main() { register int c; while ((c = getchar()) != EOF) { putchar(c); } return 0; } ------------------- WIth stdio.h:- :/home/amaresh/Testing# time ./time_header hi hi hru? hru? real 0 m4.202s user 0 m0.000s sys 0 m0.004s ------------------ Witout stdio.h and with #define EOF -1 =================== /home/amaresh/Testing# time ./time_EOF hi hi hru? hru? real 0 m4.805s user 0 m0.004s sys 0 m0.004s -- From above two case , why 2nd case is taking more time ?
what is the output of the below program & why ? #include<stdio.h> void main() { int a=10,b=20,c=30; printf("%d",scanf("%d%d%d",&a,&b,&c)); }
Write a Program in 'C' To Insert a Unique Number Only. (Hint: Just Like a Primary Key Numbers In Database.) Please Some One Suggest Me a Better Solution for This question ??
#include<stdio.h> main() { int i=1,j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; } }
To reverse an entire text file into another text file.... get d file names in cmd line
What is data _null_? ,Explain with code when u need to use it in data step programming ?
int a = 10 + 10 .... ,... A = A * A What would be the value of A? The answer is 120!! Could anyone explain this to me.
2 Answers Bosch, eInfochips, HCL, IHCL,
main() { int i =10, j = 20; clrscr(); printf("%d, %d, ", j-- , --i); printf("%d, %d ", j++ , ++i); } a. 20, 10, 20, 10 b. 20, 9, 20, 10 c. 20, 9, 19, 10 d. 19, 9, 20, 10