15,550 Topics

Member Avatar for
Member Avatar for ronnel09

i just want to ask if you know a formula, or just VERY SIMPLE codes on how to compute days between two dates? i really don't have an idea on how to make it. thank you!

Member Avatar for rubberman
0
97
Member Avatar for bugstalker

Being an experience programmer (fortran and assembly), I decided to modernize my resume and tackle c. In the process, I learned that like other programming languages, there were many 'versions' of c. Several course books I read use the conio.h header file. I was looking for a substitute for conio.h …

Member Avatar for Ancient Dragon
1
1K
Member Avatar for _avishek

My understanding of the C language is that the same identifier cannot be reused. However, the code below compiles on GCC without complaints, even when using the "-Wall -pedantic" flags. Is there something that I am missing? Does the standard say anything about functions/macros having the same name as typedef'd …

Member Avatar for _avishek
0
232
Member Avatar for ronnel09

How can i do scanf's in just one line? because example first i will input a number then i will press enter then the cursor will go to the next line. how can i maintain the cursor in just one line? thank you

Member Avatar for deceptikon
0
226
Member Avatar for shanki himanshu

int i; float *pf; pf = (float *)&i; *pf = 100.00; printf("\n %d", i);

Member Avatar for _avishek
-1
117
Member Avatar for ronnel09

i just wanna ask if can i format centered the outputs of turbo c? just like when you do in microsoft word. thank you!

Member Avatar for WaltP
0
288
Member Avatar for chandnigandhi
Member Avatar for np complete
0
176
Member Avatar for c_program_user

I am trying to pass a pointer to a 3D array to a function in which I want to access an array element using pointer arithmetic. Define the array: const unsigned char TS_list_string[2][2][3] = { "abc", "def", "ghi", "jkl", }; Define the function void process_ts(const unsigned char *T1) { unsigned …

Member Avatar for c_program_user
0
176
Member Avatar for kovacsakos

I have an array with a lot of numbers. How can I create intervals from these numbers?

Member Avatar for WaltP
0
135
Member Avatar for shanki himanshu

are these declaration same? const char *const s; char const *const s;

Member Avatar for sepp2k
0
58
Member Avatar for nabeelbhutto

any one help me how can i do this plz plz guyz help me don't say do it by your self i could'nt understand thats why i am asking from you if i know then why i ask i don't know thats why i am asking friends plz help me...!! …

Member Avatar for sfuo
0
728
Member Avatar for zeusprog

As usual I know I'm probably doing something stupid. I'm trying to write the program below but I seem to have handled my queue incorrectly. The problem could be in one of three places; the way i handle moving on to the next node, my addboard function or my printsol …

0
105
Member Avatar for kovacsakos

I would like to make a memory allocation: `(*matrix)[i]=(int*)malloc(sizeof(int)*sz);` But I have got an error message: Invalid operands to binary * What should be the problem?

Member Avatar for kovacsakos
0
174
Member Avatar for manishanibhwani

if I write the following code.. float a =1.3; double b=1.3; if(a>b) printf("hii"); else printf("hello"); the o/p comes hii...but if I change the values to 1.7 the output comes hello...can any1 explain the reason????if precision is to be taken into account then everytime double should be greater..

Member Avatar for rubberman
0
145
Member Avatar for I_m_rude

actually , I am solving a problem: A list is there in which infinite numbers(approx 1 lakh) are there, and i am reading one by one. At any point of time, I am asked to return the kth(it is given initally) minimum element from the elements read so far. my …

Member Avatar for sfuo
0
144
Member Avatar for maurya10
Member Avatar for Banfa
0
89
Member Avatar for riahc3

Hello Im posting this in C because Arena is highly influenced by C.... Im trying to open a file using fopen but I cant get it to work. Ive made the permissions on the file 777 (all) just in case but it doesnt work. Can someone please test that it …

Member Avatar for Ancient Dragon
0
125
Member Avatar for riahc3

Hello I want to run a command as sudo (to be especific open a file) but I dont want to run the entire program as sudo obviously. How do i do a fopen with sudo previlges? I dont mind hardcoding the password (eg, so it wont ask me for my …

Member Avatar for L7Sqr
0
146
Member Avatar for david.marduk.7

whenever i try to run my program it always has this error "In function mainrift" "syntax error at the end input" can someone help me. void mainrift() { int days = 1, choice = 0, gil = 20000, debt = 50000; int depgil = 0, phoenixdown1 = 0, elixiressence1 = …

Member Avatar for WaltP
0
454
Member Avatar for shanki himanshu

i am using strrev function and also included the header file string.h but i am getting the compile error **‘strrev’ was not declared in this scope**. what else is required?

Member Avatar for WaltP
0
2K
Member Avatar for ronnel09

Good day ma'am/sir, i just wanna ask how to add color in a just specific word? because i tried this one printf("You chose"); textcolor(RED); printf("RED"); but still the whole output is colored red. please help, THANKS!

Member Avatar for ronnel09
0
128
Member Avatar for milindchawre

This program displays decimal,hexadecimal & character equivalents int main(void) { int i = 0; for(i = 0; i < 255; i++) printf("Dec-%3d hex-%02x Char-%c\n", i, i, i); return 0; }

Member Avatar for DrunkenCoffin
0
162
Member Avatar for kovacsakos

How can I find the differences between two matrix? I should find the diverse numbers. Thanks in advance for your help!

Member Avatar for WaltP
0
124
Member Avatar for SHASHWATH

File program which gives output induntation code when we call that file actualy it was uninduntationed before

Member Avatar for WaltP
-3
145
Member Avatar for Vish0203

I have a little problem related to the white spaces in my program. Well, the actual program I'm trying to make is something else. so this program is just to check whether the text is properly broken or not. The problem I'm facing is, for the first word in my …

Member Avatar for Ancient Dragon
0
120
Member Avatar for milon.mahapatra
Member Avatar for milon.mahapatra
0
232
Member Avatar for I_m_rude

main() { char s[19]; strcpy(s,"\0"); if(s==NULL) printf("daniweb\n"); else printf("nitin\n"); return 0; } Can anyone tell me what is expected o/p of this and why ? help! thanks in advance.

Member Avatar for I_m_rude
0
138
Member Avatar for I_m_rude

hello, this is code to generate fibo numbers in log n time. it is giving o/p as "0", i dn't know where is error. please help. #include<stdio.h> int (*(fibo)(int m[][2],int p))[2] { int r[2][2]={0,0,0,0},d[2][2]={0,0,0,0}; int (*l)[2]; int i,j,k; if(p==1) return m; l=fibo(m,p/2); for(i=0;i<2;i++) for(j=0;j<2;j++) { r[i][j]=*((*l+i)+j); } for(i=0;i<2;i++) for(j=0;j<2;j++) for(k=0;k<2;k++) …

Member Avatar for I_m_rude
0
122
Member Avatar for Kristjon

Hello guys ! Hope you're doing well. I have faced a problem in declaring linked lists inside a linked list. I made a picture because it speaks more than 1000 words ![list1](/attachments/large/3/list1.JPG "list1") Here's my structure declaration: typedef struct author *link; struct author { char name[20]; link next; link down; …

Member Avatar for Kristjon
0
326
Member Avatar for modesto916

Hi, I'm writing a small C program to clean the radius radacct table, removing ended sessions records and inserting on a separated database. The problem is that MySQL C API doesn't have an easy way to insert the result of a query on another database/table directly, you have to build …

Member Avatar for modesto916
0
2K

The End.