Since 4/14/2012 3:17:47 AM, debanjan4you has written 4 articles and participated in 21 conversations. debanjan4you signature: debanjan4you
debanjan4you's articles:
Items(4) /1
An interview question64163 (3/5/2010 8:08:06 PM) comp.lang.c Does there exist any other alternative data structure instead of
struct tm (having same memory allocated as this structure) ? So that I
could use strftime without declaring
I am aware of the fact that rel... Debanjan
Various ways to get month name from inbuilt C library662 (2/28/2010 7:55:29 AM) comp.lang.c What are the various ways to get the name of the month corresponding to an integer value from inbuilt C/C++ library, I am familiar to strftime. Any other means to do the same ? ... Debanjan
Any exit status without explicitely using return /exit2432 (2/24/2010 8:27:04 AM) comp.lang.c This actually bugging me from quite sometime now.The question is like this : How to set the the exit status of a program to any value without explicitly using return/exit in gcc ? Let us consider this piece of... Debanjan
Is it invoking UB ?!1729 (10/4/2009 10:36:51 AM) comp.lang.c A code snippet looks likes this : { int x[5]={1,2,3,4,5},y[5]={5,4,3,2,1},result[5]={0,0,0,0,0}; int j=0; while(j++<5) result[j]=x[j]-y[j]; cout<<"contents of array :\n"; j=0; do ... Debanjan
reverse a string #38326 (9/23/2009 7:45:18 AM) comp.lang.c Hello as an exercise routine, here is a short C function, reversing a source string and writing the result in the destination buffer. Would be glad to hear some critics and advices on improvements. Thanks in... mark_cruzNOTFORSPAM(178)
Adding two numbers without + operator1451 (9/30/2009 7:22:11 AM) comp.lang.c I came across a question to add two numbers without + operator and somebody gave this solution - int main() { int num1=5,num2=7,sum; sum=printf("%*s%*s",num1,"",num2,""); printf("%d",sum); } I want to know... hppymittal(23)
Array length #31031 (10/1/2009 2:29:54 AM) comp.lang.c if I have the code like int arr[]={1,2,3}; int *arr1=arr; then how can we get the length of array arr or arr1 I have tried the following but it's of no use :( int length=0; while(arr1!=NULL) // or while(*arr!... harshaldjain(4)
initial arguments1925 (10/1/2009 5:00:03 PM) comp.lang.c I have seen these as arguments to start a C program. int main(void) and int main(int argc, char *argv[]) Is that the only arguments that can be passed to main? Does that second example cover any way... nospam116(1187)
Is it invoking UB ?!1729 (10/4/2009 10:36:51 AM) comp.lang.c A code snippet looks likes this : { int x[5]={1,2,3,4,5},y[5]={5,4,3,2,1},result[5]={0,0,0,0,0}; int j=0; while(j++<5) result[j]=x[j]-y[j]; cout<<"contents of array :\n"; j=0; do ... debanjan4you(25)
switch case question1234 (10/6/2009 12:06:30 PM) comp.lang.c Hi, please consider following code: #include int main(void) { int i; for ( i = 0; i < 10; i++ ) { switch ( i ) { case 0: case 1: case 2: case 5: printf("%d is in case!\n", i); ... fake6867(34)
Tryst with a variation of Fibonacci !!1233 (11/16/2009 2:37:09 AM) comp.lang.c Consider the following code snippet: int find_fib(int N) { assert(N>0); int f1 = 1; int f2 = 1; if(N= 2): o f(n + 1) = f(n) + f(n - 1) + 1 o f(n + 1) = 2 * fib(n) - 1 + 2 * fib(n ... nthrgeek(2)
Any exit status without explicitely using return /exit2432 (2/24/2010 8:27:04 AM) comp.lang.c This actually bugging me from quite sometime now.The question is like this : How to set the the exit status of a program to any value without explicitly using return/exit in gcc ? Let us consider this piece of... debanjan4you(25)