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 |
union u { union u { int i; int j; }a[10]; int b[10]; }u; main() { printf("\n%d", sizeof(u)); printf(" %d", sizeof(u.a)); // printf("%d", sizeof(u.a[4].i)); } a. 4, 4, 4 b. 40, 4, 4 c. 1, 100, 1 d. 40 400 4
main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
Program to find the largest sum of contiguous integers in the array. O(n)
main() { int y; scanf("%d",&y); // input given is 2000 if( (y%4==0 && y%100 != 0) || y%100 == 0 ) printf("%d is a leap year"); else printf("%d is not a leap year"); }
Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number
main() { unsigned char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
struct Foo { char *pName; }; main() { struct Foo *obj = malloc(sizeof(struct Foo)); clrscr(); strcpy(obj->pName,"Your Name"); printf("%s", obj->pName); } a. Your Name b. compile error c. Name d. Runtime error
int DIM(int array[]) { return sizeof(array)/sizeof(int ); } main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr)); }
main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }
Write a program that find and print how many odd numbers in a binary tree
main() { unsigned int i=10; while(i-->=0) printf("%u ",i); }
why array index always strats wuth zero?