{
int *ptr=(int*)malloc(sizeof(int));
*ptr=4;
printf("%d",(*ptr)+++*ptr++);
}
Answers were Sorted based on User's Feedback
Answer / rohit choudhary
4+6
as *ptr++=4 hence *ptr=5
then ++*ptr=6
so 4+6=10
ans is 10
| Is This Answer Correct ? | 2 Yes | 6 No |
Answer / prateek
compile error...!!
because malloc syntax is a=(int*)malloc(size of(int)
| Is This Answer Correct ? | 1 Yes | 7 No |
main() { char c; int i = 456; clrscr(); c = i; printf("%d", c); } a. 456 b. -456 c. random number d. none of the above
#if something == 0 int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }
Write a routine to implement the polymarker function
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
How to palindrom string in c language?
Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped
Program to Delete an element from a doubly linked list.
4 Answers College School Exams Tests, Infosys,
main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }
#define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); }
why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?
main() { signed int bit=512, mBit; { mBit = ~bit; bit = bit & ~bit ; printf("%d %d", bit, mBit); } } a. 0, 0 b. 0, 513 c. 512, 0 d. 0, -513
3 Answers HCL, Logical Computers,
Under linux environment can u please provide a c code for computing sum of series 1-2+3-4+5......n terms and -1+2-3+4-5...n terms..