Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
C
→
Dynamic Memory Allocation in C
→
Output?int main(){void *vptr, v;v = 0;vptr = &...
1.
Output?int main(){void *vptr, v;v = 0;vptr = &v;printf("%v", *vptr);getchar();return 0;}(A) 0(B) Compiler Error(C) Garbage Value
Answer»
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
Predict the output of following program. Assume that the numbers are stored in 2’s complement form.#include<stdio.h>int main(){unsigned int x = -1;int y = ~0;if (x == y)printf("same");elseprintf("not same");return 0;}(A) same(B) not same
Output?int main(){void *vptr, v;v = 0;vptr = &v;printf("%v", *vptr);getchar();return 0;}(A) 0(B) Compiler Error(C) Garbage Value
#include <stdio.h>int main(){if (sizeof(int) > -1)printf("Yes");elseprintf("No");return 0;}(A) Yes(B) No(C) Compiler Error(D) Runtime Error
Output of following program?#include<stdio.h>int main(){float x = 0.1;if ( x == 0.1 )printf("IF");else if (x == 0.1f)printf("ELSE IF");elseprintf("ELSE");}(A) ELSE IF(B) IF(C) ELSE
Predict the output of following C program#include <stdio.h>int main(){char a = 012;printf("%d", a);return 0;}(A) Compiler Error(B) 12(C) 10(D) Empty
Predict the output#include <stdio.h>int main(){float c = 5.0;printf ("Temperature in Fahrenheit is %.2f", (9/5)*c + 32);return 0;}(A) Temperature in Fahrenheit is 41.00(B) Temperature in Fahrenheit is 37.00(C) Temperature in Fahrenheit is 0.00(D) Compiler Error
Where in C the order of precedence of operators do not exist?(a) Within conditional statements, if, else(b) Within while, do-while(c) Within a macro definition(d) None of the mentionedI got this question during an interview for a job.My doubt stems from Precedence and Order of Evaluation in chapter Data Types, Operators and Expressions in C of C
Which of the following operator has the highest precedence in the following?(a) ()(b) sizeof(c) *(d) +The question was posed to me during an interview for a job.This is a very interesting question from Precedence and Order of Evaluation topic in division Data Types, Operators and Expressions in C of C
Which keyword is used to prevent any changes in the variable within a C program?(a) immutable(b) mutable(c) const(d) volatileThis question was addressed to me during an internship interview.The question is from Declarations in section Data Types, Operators and Expressions in C of C
Which of the following declaration is illegal?(a) char *str = “Best C programming classes by Sanfoundry”;(b) char str[] = “Best C programming classes by Sanfoundry”;(c) char str[20] = “Best C programming classes by Sanfoundry”;(d) char[] str = “Best C programming classes by Sanfoundry”;This question was addressed to me by my college professor while I was bunking the class.The doubt is from Declarations topic in division Data Types, Operators and Expressions in C of C
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies