Latest Answer: critical section in c ,is a piece of code that accesses a shared resource (data structure or device) that must not be concurrently accessed by more than one thread/process of execution.eg :- while(1st thread is active){Initialize CriticalSectionEnter ...
can printf be used as a variable as well as a procedure?
Latest Answer: We can use printf as a variable and it is compiling GCC compiler
This is my program which is having runtime and compiled successfully without any
warning
#include
int main( )
{
char printf='a'; /*for printing use other than ...
how can we compress any text file using c. can anybody provide me sample code
Latest Answer: #include#include#include#include#include#include#includeunion REGS in,out;void *buf;int size,count=0,px,py,rnd[4][4],correct=0;float octave [7]={130.81,146.83,164.81,174.61,196,220,246.94};int ...
what is the minimum execution of do while() and while()?if there is a change why is it so?
Latest Answer: while :it checks the neccessary condition before the exexution of loopif the condition=true then loop is executed and after one loop again the condition is checked and if true loop is again executed..and so onif condition is false then loop is not executed ...
what is the difference between strncpy()(not strcpy) & memcpy() function in C?
Latest Answer: strncpy copies upto null or specified no. of bytes, whichever is less. But memcpy overlooks null, and copies all specified no. of bytes. None of them adds null in destination string by itself. #include#include#includevoid ...
Explain why p++ is faster than p+1?
Latest Answer: This has to do with the processor, memory read cycles, and processor instructions. All processors have separate increment/decrement instructions for increment/decrement operations. Consequently, when increment/decrement operation has to be carried out ...
What's the "condition" so that the following codesnippet prints both HelloWorld !if "condition"printf ("Hello");elseprintf("World");
Latest Answer: /* Solution 1: */int main(int argc, char* argv[]){ if( argc == 2 || main( 2, NULL ) ) { printf("Hello "); } else { printf("Worldn"); } return 0;}/* Solution 2 (Only for Unix and Linux): */int main(int argc, char* argv[]){ if( ...
What's the best way to declare and define global variables and functions?
Latest Answer: Best Way to represent a variable as global is , Just define the variable at the initial or just below the headers files For Example:- ...
Latest Answer: longlong ...
View page << Previous 1 2 3 [4] 5 6 7 8 9 10 Next >>

Go Top