Write the implementation of Fix function? fix(2.5) = 2 and fix(-2.25) = -3, this is the expected result. Write the code to implement this behaviour?
Latest Answer: #include#include#includeint fix(float);int main(){ int result; float val; printf("Enter the value to be converted: "); scanf("%f",&val); ...
How will you execute shell command without using system command in C-language? Write a program to execute ls -l and redirect the output to a file, without using system command ?
Latest Answer: You can use exec family of system calls to get the job done. Its a nice experience, go ahead and explore it. ...
Why it is not possible to create pointer to unsingned int?
Latest Answer: The variable the holds the address (the pointer) is not interested if the value at the address it stores is signed or unsigned. One thing is sure: it must store an int, careless if it is signed or unsigned. ...
In C if a variable is not assigned a value then why does it take garbage value?
Latest Answer: This happens only in case of local varibales. As memory for local variables are allocated on stack and while allocating the memory the runtime system does not clear the memory before allocating it to the variable unlike in case of allocating memory in ...
What is code/binary portability?
Latest Answer: Code portability is generally defined as C code (in the case of C) that adheres to the rules of the C standards and is Architecture (Pentium, PowerPC, MIPS, etc) as well as Platform (PC, Mac OS, Linux, etc) independent. All you need to do with code ...
Write a program that compares two files and return 0 if they are equal and 1 if they are not equal.
Latest Answer: int main(int argc, char* argv[]) { if(argc!=3) return -1; FILE *fp1, *fp2; fp1 = fopen(argv[1],"r"); fp2 = fopen(argv[2],"r"); if(!fp1 || !fp2) return -1; while(fgetc(fp1) == fgetc(fp2) && ...
When reallocating memory if any other pointers point into same piece of memory do you have to readjust these pointers or do they get readjusted automatically?
Latest Answer: While reallocating, there is no readjustments. The OS will just search for the required memory block(not in use) & if available pass its pointer to the user.Nb: It CAN be the same pointer you have before reallocation. ...
What is the maximum length of command line arguments including space between adjacent arguments ?
Latest Answer: It can compile 200 words of length. ...
what is a bss data segment?
Latest Answer: BSS, a part of Data Segment store all variables initialized to 0. static variable(initialized with value other than 0) are not stored in BSS.Actually BSS is an "Uninitialized RAM" which is initialized to 0 before executing main(). ...
which type of memory(stack or heap)is used by static and external variables?
Latest Answer: Fully agree with vivekbansal. Static variables (not initialized to value other than 0) are always stored in BSS else in "Data" of data segment. ...
View page [1] 2 3 4 5 6 7 8 9 10 Next >>

Go Top