15,552 Topics

Member Avatar for
Member Avatar for aratnon

sorry i'm new at c i want to read these data from txt file. A 7 c 5 y 6 U 9 j 4 Z 3 z 5 0 here is my code while(feof(input)==0){ char c; int num; fscanf(input,"%c%d",&c,&num); printf("%c:%d\n",c,num); } but result in console is not same as txt …

Member Avatar for deceptikon
0
239
Member Avatar for t888eddy

In a forest n animals has homes. Each home has m racks, each rack for each of the m products which the animals can buy from the shop. From the shop, only the king can buy and only in the first day of the month. The king needs to know …

Member Avatar for t888eddy
0
224
Member Avatar for benk1

Hi everyone I have a simple piece of code thus: char userChoice = '\0'; validate:; printf("Please make a choice [y/n] \n"); //fflush (stdout) ; scanf("%c", &userChoice); if(userChoice != 'y' && userChoice != 'n' ) { printf("\nInvalid input; please enter y or n. \n "); userChoice = '\0'; goto validate; } …

Member Avatar for WaltP
0
149
Member Avatar for rithish

#include<stdio.h> int arr[20]; int main() { int n,i; printf("Enter the size of array\n"); scanf("%d",&n); printf("Enter the elements:"); for(i=0; i<n; i++) scanf("%d",&arr[i]); merge_sort(arr,0,n-1); printf("Sorted array:"); for(i=0; i<n; i++) printf(" \n %d",arr[i]); return 0; } int merge_sort(int arr[],int low,int high) { int mid; if(low<high) { mid=(low+high)/2; merge_sort(arr,low,mid); merge_sort(arr,mid+1,high); // Combine merge(arr,low,mid,high); } …

Member Avatar for WaltP
0
104
Member Avatar for I_m_rude

Can anyone give me the nest links so as to learn socket programming in C from net ? As i have searched net a lot and also have read many things, but i want you all to tell some more better links. thanks in advance.

Member Avatar for deceptikon
0
172
Member Avatar for jhonhiel.abasolosasaban

i cant run my program even my directories are correct.......!! my flashdrive is in (F;) then in my directories are: Include Directories F:\TC\INCLUDE\ Library Directories F:\TC\LIB what will i do.....??

Member Avatar for np complete
0
101
Member Avatar for aasi007onfire

[code]void strcpy(char *s, char *t) { while ( (*s++ = *t++) != `\0);}[/code] i saw this code in a particular book..... in the what does the assignment statement (*s++=*t++) return each time it gets executed........ all along i was thinking that the assignment statement return a 0 or 1 based …

Member Avatar for Ancient Dragon
0
190
Member Avatar for shashikumar s g

to input an unsigned integer and reverse the first and last nibble of the number

Member Avatar for I_m_rude
0
281
Member Avatar for aero31aero

I want to make a program that analysises which key has been pressed the most as a part of my school assignment. I want that the key input be recieved by my program and later by the program it was intended for. Is there a way to do this? Please …

Member Avatar for WaltP
0
233
Member Avatar for I_m_rude

Can anybody give me code snippet for finding the nth fibo number in logn time using matrix exponentiation ? thanks in advance.

Member Avatar for I_m_rude
0
137
Member Avatar for shanki himanshu

struct abcd { char q; int w; //long int e; }; why size of this structure is 8 bytes and if i include **long int e** , size becomes 12 bytes?

Member Avatar for I_m_rude
0
104
Member Avatar for sudhanshu.srivastava.7

just like java has sun microsystem certification exam what is for c certification?

Member Avatar for I_m_rude
0
130
Member Avatar for fahad.alsharafi.1

I am in first sem in university.. and i can't do it alone ~~ http://www.mediafire.com/view/?1nqlfsuc3nrg4cc any one can help to solve those 3 questions or any one ^^

Member Avatar for deceptikon
0
131
Member Avatar for I_m_rude

hi.. can anybody please tell me that how can i print the execution time for my code ? Actually, what exaclty i want is that my program should also print the time which is elapsed while executing it or for maupulating any i/p. any pre-defined or user-defind function which can …

Member Avatar for I_m_rude
0
105
Member Avatar for gemanthony.gonzales

#include <stdio.h> #include <stdio.h> #include <stdlib.h> #define p printf #define s scanf int total( int q, int w); void gemar(void); void gem(void); int setfunction (int *team1score,int *team2score); static int team1score_set1 ; static int counter1_set1 = 0; static int team2score_set1 ; static int counter2_set1 = 0; static int team1score_set2 ; static …

Member Avatar for I_m_rude
0
212
Member Avatar for manishanibhwani

can anyone tell the output of following code and also explain it #include<stdio.h> #include<stdlib.h> union employee { char name[15]; int age; float salary; }; const union employee e1; int main() { strcpy(e1.name, "K"); printf("%s %d %f", e1.name, e1.age, e1.salary); return 0; }

Member Avatar for I_m_rude
0
104
Member Avatar for ronnel09

Is main(); function included as loop statement? for example i have a program with subprograms then if I finished a subprogram i will use main(); function to go back from the main program. is that considered as loop? thanks!!

Member Avatar for _avishek
0
103
Member Avatar for gAb1

Hi, first i need to download a good compiler, what can you recommend me? I always used dev-c++ but in windows 8 don't work, it gives this error: "gcc.exe: Internal error: Aborted (program collect2)". Well, i need to get content from json files to make a sql sentence, insert into. …

Member Avatar for _avishek
0
197
Member Avatar for Shashank clic

** # is it possible to creat threads in c-programming? # ** ## Sub-Heading Here ## yes,then how? no, then why not?

Member Avatar for nmaillet
0
109
Member Avatar for bharath744

Hello, I have an array string as character[i] = "john" Now, when i supply 'o', it should return me the array index from above as '1'. 'j' as 0 'o' as 1 'h' as 2, etc. Please help

Member Avatar for myk45
0
40
Member Avatar for Gaiety

I have some strange problem which i started facing from yesterday. i have used GDB many times on my system , but yesterday when i started running GDB , my dubugger is enterings the library functions code part also which is very irritating for me. I mean if the program …

Member Avatar for _avishek
0
638
Member Avatar for piero.costa

Hi guys, I'm facing a new problem. Now I'm learning how to send signals to process in order to make them communicate. I was trying to create a process and when this process is created, send a signal to his father... But I had no success. I get a bunch …

Member Avatar for rubberman
0
755
Member Avatar for billionair

I'm trying to make a C program to run DOS commands but I keep getting "illegal command" error. Here's the code. #include<stdio.h> #include<process.h> int main() { system("ipconfig/all"); return 0; }

Member Avatar for Ancient Dragon
0
781
Member Avatar for Orymeyer

Considering the following lines of C code: #include <stdio.h> #include <stdlib.h> #include <ctype.h> void print_upper(char *string); int main() { char s[80]; printf("enter a string\n"); gets(s); print_upper(s); printf("\ns is now in upper case: %s",s); return 0; } void print_upper(char *string) { register int t; int k; for(t=0;string[t];++t) { string[t]=toupper(string[t]); putchar(string[t]); } …

Member Avatar for Vish0203
0
144
Member Avatar for I_m_rude

hi... Can anyone please explain that why we always take 6 points into consideration while finding closet pair of points in a given set of points ?This problem is solved using divide and conquer algorithm. And if anyone please give me psuedo code for closest pair problem, then i will …

Member Avatar for I_m_rude
0
180
Member Avatar for kovacsakos

I should write a program for school classification. It should give out all the 5 marks, but nobody can be on the border points or near the border points. Thanks in advance for your help!

Member Avatar for WaltP
0
118
Member Avatar for chai1234
Member Avatar for Nivashini1992

hello guys, I 've just recently stated writing algorithms in Data structures. I want questions to write algorithms in array and linked list, please give me questions in that. The questions can be of difficulty level easy and medium. thank u.

Member Avatar for I_m_rude
0
81
Member Avatar for n3red

I have Google'd and all i found was outdated, buggy or not working source samples. Here is what i tried but i have a bit of a problem: [CODE]void toDecimal(char bin[]){ int i, d = 0; int l = strlen(bin)-1; int x = 1; for(i = 0; i < l; …

Member Avatar for Rajkumarautit
0
329
Member Avatar for johnray31

hello friends, could you guide me how i can write my own version of malloc and free function

Member Avatar for np complete
0
1K

The End.