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 |
main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); } int i;
main() { int c=- -2; printf("c=%d",c); }
How can you relate the function with the structure? Explain with an appropriate example.
how to return a multiple value from a function?
1) int i=5; j=i++ + i++ + i++; printf("%d",j);This code gives the answer 15.But if we replace the value of the j then anser is different?why? 2)int i=5; printf("%d",i++ + i++ + i++); this givs 18.
What is the subtle error in the following code segment? void fun(int n, int arr[]) { int *p=0; int i=0; while(i++<n) p = &arr[i]; *p = 0; }
main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }
main( ) { char *q; int j; for (j=0; j<3; j++) scanf(“%s” ,(q+j)); for (j=0; j<3; j++) printf(“%c” ,*(q+j)); for (j=0; j<3; j++) printf(“%s” ,(q+j)); }
Sir... please give some important coding questions asked by product companies..
Is the following code legal? struct a { int x; struct a b; }
#define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); }
#include<conio.h> main() { int x,y=2,z,a; if(x=y%2) z=2; a=2; printf("%d %d ",z,x); }