main()
{
char c=' ',x,convert(z);
getc(c);
if((c>='a') && (c<='z'))
x=convert(c);
printf("%c",x);
}
convert(z)
{
return z-32;
}
Answer / susie
Answer :
Compiler error
Explanation:
declaration of convert and format of getc() are wrong.
| Is This Answer Correct ? | 9 Yes | 1 No |
main() { int i; clrscr(); printf("%d", &i)+1; scanf("%d", i)-1; } a. Runtime error. b. Runtime error. Access violation. c. Compile error. Illegal syntax d. None of the above
Finding a number which was log of base 2
main() { char *p; p="%d\n"; p++; p++; printf(p-2,300); }
main() { char *p="hai friends",*p1; p1=p; while(*p!='\0') ++*p++; printf("%s %s",p,p1); }
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
Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped
main() { static int var = 5; printf("%d ",var--); if(var) main(); }
main() { char c; int i = 456; clrscr(); c = i; printf("%d", c); } a. 456 b. -456 c. random number d. none of the above
Is the following code legal? void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }
struct point { int x; int y; }; struct point origin,*pp; main() { pp=&origin; printf("origin is(%d%d)\n",(*pp).x,(*pp).y); printf("origin is (%d%d)\n",pp->x,pp->y); }
How can i find first 5 natural Numbers without using any loop in c language????????
void main() { char ch; for(ch=0;ch<=127;ch++) printf(ā%c %d \nā, ch, ch); }