Saturday, January 5, 2008
What is a NULL pointer? How is it different from an unitialized pointer? How is a NULL pointer defined?
Posted by Admin at 11:39 AM 0 comments
Labels: C
What does *p++ do? Does it increment p or the value pointed by p?
Posted by Admin at 11:39 AM 2 comments
Labels: C
Check if the 20th bit of a 32 bit integer is on or off?
Posted by Admin at 11:38 AM 0 comments
Labels: C
How would you count the number of bits set in a floating point number?
Posted by Admin at 11:38 AM 0 comments
Labels: C
Does an array always get converted to a pointer? What is the difference between arr and &arr? How does one declare a pointer to an entire array?
Posted by Admin at 11:38 AM 0 comments
Labels: C
What does malloc() , calloc(), realloc(), free() do? What are the common problems with malloc()? Is there a way to find out how much memory a pointer
Posted by Admin at 11:37 AM 0 comments
Labels: C
What's the difference between const char *p, char * const p and const char * const p?
Posted by Admin at 11:37 AM 0 comments
Labels: C
What is a void pointer? Why can't we perform arithmetic on a void * pointer?
Posted by Admin at 11:37 AM 0 comments
Labels: C
What do Segmentation fault, access violation, core dump and Bus error mean?
Posted by Admin at 11:37 AM 0 comments
Labels: C
What is the difference between an array of pointers and a pointer to an array?
Posted by Admin at 11:37 AM 0 comments
Labels: C
What are brk() and sbrk() used for? How are they different from malloc()?
Posted by Admin at 11:36 AM 0 comments
Labels: C
What is a dangling pointer? What are reference counters with respect to pointers?
Posted by Admin at 11:36 AM 0 comments
Labels: C
Is *(*(p+i)+j) is equivalent to p[i][j]? Is num[i] == i[num] == *(num + i) == *(i + num)?
Posted by Admin at 11:35 AM 0 comments
Labels: C
What operations are valid on pointers? When does one get the Illegal use of pointer in function error?
Posted by Admin at 11:35 AM 0 comments
Labels: C
What is the difference between malloc() and calloc()?
Posted by Admin at 11:34 AM 0 comments
Labels: C
Does extern in a function declaration mean anything?
Posted by Admin at 11:33 AM 0 comments
Labels: C
How to declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
Posted by Admin at 11:32 AM 0 comments
Labels: C
Can we declare a function that can return a pointer to a function of the same type?
Posted by Admin at 11:32 AM 0 comments
Labels: C
How can I write a function that takes a variable number of arguments? What are the limitations with this? What is vprintf()?
Posted by Admin at 11:31 AM 0 comments
Labels: C
With respect to function parameter passing, what is the difference between call-by-value and call-by-reference? Which method does C use?
Posted by Admin at 11:31 AM 0 comments
Labels: C
If I have the name of a function in the form of a string, how can I invoke that function?
Posted by Admin at 11:31 AM 0 comments
Labels: C
What does the error, invalid redeclaration of a function mean?
Posted by Admin at 11:31 AM 0 comments
Labels: C
How can I pass the variable argument list passed to one function to another function.
Posted by Admin at 11:31 AM 0 comments
Labels: C
How do I pass a variable number of function pointers to a variable argument (va_arg) function?
Posted by Admin at 11:31 AM 0 comments
Labels: C
Will C allow passing more or less arguments than required to a function.
Posted by Admin at 11:31 AM 0 comments
Labels: C
Can we use variables inside a switch statement? Can we use floating point numbers? Can we use expressions?
Posted by Admin at 11:26 AM 0 comments
Labels: C
Whats wrong with the expression a[i]=i++; ? Whats a sequence point?
Posted by Admin at 11:24 AM 0 comments
Labels: C
Does the ?: (ternary operator) return a lvalue? How can I assign a value to the output of the ternary operator?
Posted by Admin at 11:24 AM 0 comments
Labels: C
What is the difference between if(0 == x) and if(x == 0)?
Posted by Admin at 11:24 AM 0 comments
Labels: C
What is the difference between a statement and a block?
Posted by Admin at 11:24 AM 0 comments
Labels: C
What is the difference between the & and && operators and the | and || operators?
Posted by Admin at 11:23 AM 0 comments
Labels: C
Is C case sensitive (ie: does C differentiate between upper and lower case letters)?
Posted by Admin at 11:23 AM 0 comments
Labels: C
What purpose do #if, #else, #elif, #endif, #ifdef, #ifndef serve?
Posted by Admin at 11:23 AM 0 comments
Labels: C
What is more efficient? A switch() or an if() else()?
Posted by Admin at 11:21 AM 0 comments
Labels: C
Friday, January 4, 2008
How can we find out the length of an array dynamically in C?
Posted by Admin at 5:48 AM 0 comments
Labels: C
How to write functions which accept two-dimensional arrays when the width is not known before hand?
Posted by Admin at 5:47 AM 0 comments
Labels: C
Can we determine the offset of a field within a structure and directly access that element?
Posted by Admin at 5:47 AM 0 comments
Labels: C
Why do structures get padded? Why does sizeof() return a larger size?
Posted by Admin at 5:47 AM 0 comments
Labels: C
What is a union? Where does one use unions? What are the limitations of unions?
Posted by Admin at 5:47 AM 0 comments
Labels: C
How does one use fread() and fwrite()? Can we read/write structures to/from files?
Posted by Admin at 5:46 AM 0 comments
Labels: C
Can we pass constant values to functions which accept structure arguments?
Posted by Admin at 5:46 AM 0 comments
Labels: C
Can we directly compare two structures using the == operator?
Posted by Admin at 5:46 AM 0 comments
Labels: C
Can structures be assigned to variables and passed to and from functions?
Posted by Admin at 5:46 AM 0 comments
Labels: C
Can structures be assigned to variables and passed to and from functions?
Posted by Admin at 5:46 AM 0 comments
Labels: C
What is the token pasting operator and stringizing operator in C?
Posted by Admin at 5:46 AM 0 comments
Labels: C
How can I write a macro which takes a variable number of arguments?
Posted by Admin at 5:46 AM 0 comments
Labels: C
Is it acceptable to declare/define a variable in a C header?
Posted by Admin at 5:45 AM 0 comments
Labels: C
Is there a limit on the number of characters in the name of a header file?
Posted by Admin at 5:45 AM 0 comments
Labels: C
What should go in header files? How to prevent a header file being included twice? Whats wrong with including more headers?
Posted by Admin at 5:45 AM 0 comments
Labels: C
What is the difference between enumeration variables and the preprocessor #defines?
Posted by Admin at 5:45 AM 0 comments
Labels: C
How can I declare an array with only one element and still access elements beyond the first element (in a valid fashion)?
Posted by Admin at 5:41 AM 0 comments
Labels: C
What is the difference between char *a and char a[]?
Posted by Admin at 5:41 AM 0 comments
Labels: C
Is exit(status) equivalent to returning the same status from main()?
Posted by Admin at 5:41 AM 0 comments
Labels: C
Whats the prototype of main()? Can main() return a structure?
Posted by Admin at 5:40 AM 0 comments
Labels: C
Can you compare two strings like string1==string2? Why do we need strcmp()?
Posted by Admin at 5:39 AM 0 comments
Labels: C
What do memcpy(), memchr(), memcmp(), memset(), strdup(), strncat(), strcmp(), strncmp(), strcpy(), strncpy(), strlen(), strchr(), strchr(), strpbrk()
Posted by Admin at 5:39 AM 0 comments
Labels: C
Why do some people put void cast before each call to printf()?
Posted by Admin at 5:39 AM 0 comments
Labels: C
Why do we get the floating point formats not linked error?
Posted by Admin at 5:38 AM 0 comments
Labels: C
Why should one use strncpy() and not strcpy()? What are the problems with strncpy()?
Posted by Admin at 5:38 AM 0 comments
Labels: C
How can I convert numbers to strings (the opposite of atoi)?
Posted by Admin at 5:38 AM 0 comments
Labels: C
How can I specify a variable width in a scanf() format string?
Posted by Admin at 5:38 AM 0 comments
Labels: C