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 / anshu ranjan
#include<stdio.h>
void main()
{
if(printf("%c",59)){}
}
\\actually, this is correct
| Is This Answer Correct ? | 104 Yes | 3 No |
Answer / vinay_csjm
void main()
{
if(printf("semicolon")){}
if(printf(getch())){}
}
| Is This Answer Correct ? | 72 Yes | 35 No |
Answer / ankit popli
Answer#2 has a mistake thats why its not working in TURBO C/C++.....i.e
void main()
{
while(!printf("\nHello World"))
{}
}
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / arun chauhan
#include<stdio.h>
void main()
{
if(printf("semicolon"))
{}
}
when you compile and run the program it will not stop at the console. You can see the result with the help of Alt+F5
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / rakesh
#include<stdio.h>
void main()
{
if(printf("semicolon")){}
if(getch()){}
}
this will print the word 'semicolon'
| Is This Answer Correct ? | 3 Yes | 2 No |
Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing each bit is not a solution)
write a c program to Reverse a given string using string function and also without string function
main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
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.
#include<stdio.h> int main() { int a=3,post,pre; post= a++ * a++ * a++; a=3; pre= ++a * ++a * ++a; printf("post=%d pre=%d",post,pre); return 0; }
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]); }
union u { struct st { int i : 4; int j : 4; int k : 4; int l; }st; int i; }u; main() { u.i = 100; printf("%d, %d, %d",u.i, u.st.i, u.st.l); } a. 4, 4, 0 b. 0, 0, 0 c. 100, 4, 0 d. 40, 4, 0
What is full form of PEPSI
char *someFun1() { char temp[ ] = “string"; return temp; } char *someFun2() { char temp[ ] = {‘s’, ‘t’,’r’,’i’,’n’,’g’}; return temp; } int main() { puts(someFun1()); puts(someFun2()); }
how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.
0 Answers Mbarara University of Science and Technology,
String reverse with time complexity of n/2 with out using temporary variable.
main() { int i=5; printf("%d",++i++); }