main(int argc, char *argv[])
{
(main && argc) ? main(argc-1, NULL) : return 0;
}
a. Runtime error.
b. Compile error. Illegal syntax
c. Gets into Infinite loop
d. None of the above
Answers were Sorted based on User's Feedback
Answer / sushil
it will give a run time error since , return cannot be used
as it is used in ternary operator.
Is This Answer Correct ? | 1 Yes | 3 No |
main() { char *p="hai friends",*p1; p1=p; while(*p!='\0') ++*p++; printf("%s %s",p,p1); }
void main() { int i=5; printf("%d",i++ + ++i); }
what is oop?
main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit = (bit >> (i - (i -1)))); } } a. 512, 256, 128, 64, 32 b. 256, 128, 64, 32, 16 c. 128, 64, 32, 16, 8 d. 64, 32, 16, 8, 4
Write a program using one dimensional array to assign values and then display it on the screen. Use the formula a[i]=i*10 to assign value to an element.
1 Answers Samar State University,
Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped
what is brs test reply me email me kashifabbas514@gmail.com
what is the output of the below program & why ? #include<stdio.h> void main() { int a=10,b=20,c=30; printf("%d",scanf("%d%d%d",&a,&b,&c)); }
main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcpy(a,b)); } a. “Hello” b. “Hello World” c. “HelloWorld” d. None of the above
4 Answers Corporate Society, HCL,
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
main() { if ((1||0) && (0||1)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above
find A^B using Recursive function