main{int x=90;float *ptr;ptr=(float *)&x;*ptr=50.0;printf("%d",x);printf("%f",*pf);}Though the address of i & pf are same but the value which i get when i print x is a different integer
Latest Answer: It is always helpful to write valid code. Your example would not compile and the output would not be readable.1: int x = 90;2: float* ptr;3: ptr = (float*)&x;4: *ptr = 50.0f; ...
How a variable value is stored and retrieved at runtime in C?for example main(){ int a; a=5; }Where is the value of 'a' stored and How it is retrieved at runtime?
Latest Answer: For handling multithreading in c programming the two common libraries that is mainly used are LIBCMT.LIB and MSVCRT.LIB. The compiler must be ensured about the usage of these libraries while implementing multithreading in c programming. ...
Latest Answer: There are 2 points to be discussed......1. FREE FORM LANGUAGE - C is called FREE FROM beacuse the statements can be written from any position. Unlike COBOL, where each field/section needs to be started at a prefefined position. 2. MIDDLE LEVEL LANGUAGE ...
Latest Answer: Pointers to functions concept is used in C programming language in various instances. One of the common instance in which programmers use pointers to function concept is for passing pointers to a function as the name implies.For example the below declares ...
Latest Answer: Here is the code for palindrome with recursive mechanism#includeint rev=0; //Global Variableint REV(int num){if(num>0){ rev=(rev*10)+ (num %10); REV(num / 10); //calling the Function recursively. ...
int *ptr = (int *)malloc(100*(sizeof(int)));ptr++;free(ptr);
Latest Answer: it will allocate 200 bytes of memory and returns pointer to the first location...correct me if iam wrongregardsumesh ...
Given specification: if (x >2) then print 2*x; else print 2+x, where x is an integer variable. From the perspective of blackbox testing, discuss whether the following implementation is faulty if (x>=2) print (2*x) ;else print (2+x);
1) If either operand of an arithmetic operator is unsigned long, the other operand is promoted to unsigned long. 2) If either operand of an arithmetic operator is unsigned int, the other operand
Latest Answer: Here we cant say the default promotion without knowing the other operand.But if two operands are of different datatypes and the arithmetic operation is performed on these operands the compiler allocates the memory of higher datatype for the resulting ...
View page << Previous 4 5 6 7 [8] 9 10 11 Next >>

Go Top