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
Answer / guest
d, printf( ) prints address/garbage of i,
scanf() dont hav & sign, so scans address for i
+1, -1 dont hav any effect on code
Is This Answer Correct ? | 13 Yes | 5 No |
What is the main difference between STRUCTURE and UNION?
Set up procedure for generating a wire frame display of a polyhedron with the hidden edges of the object drawn with dashed lines
how to return a multiple value from a function?
main() { extern int i; i=20; printf("%d",sizeof(i)); }
main(int argc, char **argv) { printf("enter the character"); getchar(); sum(argv[1],argv[2]); } sum(num1,num2) int num1,num2; { return num1+num2; }
main() { int k=1; printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE"); }
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
You are given any character string. Find the number of sets of vowels that come in the order of aeiou in the given string. For eg., let the given string be DIPLOMATIC. The answer returned must be "The number of sets is 2" and "The sets are "IO and AI". Vowels that form a singleton set must be neglected. Try to post the program executable in gcc or g++ or in java.
Printf can be implemented by using __________ list.
main() { char c; int i = 456; clrscr(); c = i; printf("%d", c); } a. 456 b. -456 c. random number d. none of the above
writte a c-programm to display smill paces
write a program in c to merge two array