Cau u say the output....?
Answer / pranav
void main()
{
int i=1;
printf("%d %d %d",i++,++i,i++);
}
| Is This Answer Correct ? | 0 Yes | 0 No |
#include <stdio.h> main() { char * str = "hello"; char * ptr = str; char least = 127; while (*ptr++) least = (*ptr<least ) ?*ptr :least; printf("%d",least); }
#include <stdio.h> int main(void) { int a=4, b=2; a=b<<a+b>>2 ; printf("%d",a); return 0; }
How to access command-line arguments?
void main() { int i; char a[]="\0"; if(printf("%s\n",a)) printf("Ok here \n"); else printf("Forget it\n"); }
main() { char str1[] = {‘s’,’o’,’m’,’e’}; char str2[] = {‘s’,’o’,’m’,’e’,’\0’}; while (strcmp(str1,str2)) printf(“Strings are not equal\n”); }
main() { char c=' ',x,convert(z); getc(c); if((c>='a') && (c<='z')) x=convert(c); printf("%c",x); } convert(z) { return z-32; }
#ifdef something int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }
How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)
What is the output for the program given below typedef enum errorType{warning, error, exception,}error; main() { error g1; g1=1; printf("%d",g1); }
how can i cast a char type array to an int type array
main() { char *p; p="%d\n"; p++; p++; printf(p-2,300); }
void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %d\n",++i); }