15,551 Topics

Member Avatar for
Member Avatar for pororo11

Hi, Im doing a testing for taking the previous values of dbgname and export the values to the new variable (CDUMAPDBGNAME_NEW), but it doesn't output the value when i do the echo $CDUMAPDBGNAME_NEW statement. Anyone can help me on this? #include <stdio.h> #include <string.h> main (int argc, char **argv) { …

Member Avatar for L7Sqr
0
5K
Member Avatar for moonw3ll

Just what is wrong with this simple code of mine? [CODE]#include<stdio.h> #include<string.h> #include<stdlib.h> main() { int i=0, num; char a[8]; char keyword[8]; system("cls"); while(i<8) { num = rand()%3; if ( num == 0 ) a[i] = 65 + rand()%26; /* 65 is the ascii value of A */ else if …

Member Avatar for moonw3ll
0
235
Member Avatar for Ararat

is it possible to make scanf not go into a newline after printf? [CODE]#include <stdio.h> #include <conio.h> int main(){ int a; scanf("%d",&a); printf ("%d",a); getch(); }[/CODE] output(suppose a is 5) :[CODE]5 5[/CODE] i want to print them in the same line like this [CODE]5 5[/CODE] how do i do that?

Member Avatar for DJSAN10
0
8K
Member Avatar for shanki himanshu

In a program i have to calculate pow(2,N) where 0<N<=1000. which data type is suitable for this? I have used unsigned long long int but its range is also limited.

Member Avatar for subith86
0
123
Member Avatar for shubham.joy

Hi all Please suggest an algorithm to find square root of a big number ( 100+ digits ) in C/C++.. Thank you

Member Avatar for Shardendu
0
152
Member Avatar for The 42nd

Here I am again... The question that I have is this: How do I sort an array of structures by two criteria? One element of the array looks like this: [CODE]struct record{ char name[32]; double value;};[/CODE] The goal would be to sort the array by name and if the name …

Member Avatar for Narue
0
2K
Member Avatar for Haritha91

Hey friends, I want to compile a C program using Command prompt. I have the turbo C compiler. Please show me the way with a simple example.

Member Avatar for Narue
0
116
Member Avatar for gourav1

hi. i want to print all the possible combinations of a string entered. for example:- string input is "abc"... then output is "abc bac acb bca cba cab" and it must be true for every length of string.. i have tried many times and applied as much logics i can. …

Member Avatar for subith86
0
101
Member Avatar for ishanatmuz

I want to know how to download a file using c ? For copying a file in c I do this. [code=c] #include<stdio.h> #include<conio.h> int main() { FILE *inf, *ouf; char ch; inf = fopen ( "file1.ext" , "rb" ); ouf = fopen ( "file2.ext" , "wb" ); while( !feof …

Member Avatar for rubberman
0
296
Member Avatar for yinyue

: : [CODE]void detectFaces(IplImage *img) { /* detect faces */ CvSeq *faces = cvHaarDetectObjects( img, /* the source image */ cascade_f, /* the face classifier */ storage, /* memory buffer, created with cvMemStorage */ 1.1, 3, 0, /* special parameters, tune for your app */ cvSize(40, 40) /* minimum detection …

Member Avatar for Narue
0
208
Member Avatar for c_learner

Dear All, I'm new to C, and would appreciate your help about the below code. The purpose of the program is to multiply the elements of the array and print the result. The user enters the value for how many elements he wants to have multiplied, and then the function …

Member Avatar for c_learner
0
2K
Member Avatar for Varun Bhat

[CODE]#include<stdio.h> #include<conio.h> #include<stdlib.h> #include<string.h> #include<time.h> void main() { int i[100]; int j[100]; int k; int m; clrscr(); printf("Enter the number of questions needed:"); scanf("%d",&m); if (m<=100); { i[100]=rand()%m; printf("%d \n",i,rand()); j[100]=rand()%m; printf("%d",j,rand()); i[100]=rand()%m; printf("%d \n",i,rand()); j[100]=rand()%m; printf("%d",j,rand()); } getch(); } [/CODE] I want to generate random numbers when I press …

Member Avatar for WaltP
0
167
Member Avatar for annonymous21

I have been working on this for some time and need some help. I have posted to another forum with no results. I figured i would try here and see if i can get some real help. I am trying to populate an array with the contents of a file …

Member Avatar for annonymous21
0
324
Member Avatar for Despairy

Hi, i have a client which reads from the socket: [CODE] for (index=0;index<SCALERS;index++) { read(my_socket,vectorScalerPointer,BUFLEN); read(my_socket,resultScalerPointer,BUFLEN); sum+= atoi(vectorScaler)*atoi(resultScaler); }[/CODE] and a server program which writes to it. [CODE] for (index=0;index<SCALERS;index++) { sprintf(ascii,"%d",(*matrixStruct)._vector[0][index]); write(fd,ascii,BUFLEN); sprintf(ascii,"%d",(*matrixStruct)._mat[atoi(whichRow)][index]); write(fd,ascii,BUFLEN); }[/CODE] now the problem is the programs are in a "race condition" usualy the server …

Member Avatar for Despairy
0
168
Member Avatar for anita_86

Hi again!And happy new year to all.Just got to attained an interview and was asked about some c questions.Would like to know what does these lines means?Can anyone tell me? [CODE]int main() { int k=printf("Hello"); return 0; exit(10); } [/CODE] I got answeres like [QUOTE]You're outputting "Hello" on the screen …

Member Avatar for anita_86
0
159
Member Avatar for wickedQuasar

I have to sort a large array of numbers wherein the numbers are random and range from 1 to 9,99,999...till the time the length of array is less than 2,00,000, all sorts work fine (i tried selection, insertion and quick sort)...but when the length of array is increased to 3,00,000 …

Member Avatar for wickedQuasar
0
400
Member Avatar for agniputra

Hi can u pls tel me how to tackle a problem like this: 1234567890123456 is the number to be loaded in db... i need to convert it to double without using atof()... if i use atof() function the number is rounded off to 1234567890123460... ??? can anyone suggest for a …

Member Avatar for dannyniu
0
737
Member Avatar for Lillylionhert

I am working on a Priority Based Scheduler which reads the process in from a file. I have it reading from file and printing to the screen. I'm trying to use strtok to tokenize a line from the process test file and store it in three different arrays. The layout …

Member Avatar for Lillylionhert
0
4K
Member Avatar for mk.hashmie

I have just started learning C language. I am finding problems in nested loops and arrays. how can i learn them?? i am really getting problem

Member Avatar for mk.hashmie
0
76
Member Avatar for jeffwang66

Hi,guys: I put 15 struct variables into a continuous memory at first by using memcpy(). And then I want to print out the element of first struct variable. The correct value is 1, but sometimes "0" is printed out. I do not know why. Can someone who is familar with …

0
74
Member Avatar for IcantC

Hi there, I am trying to compile devcpp project that contains one source file helloworld.cpp [CODE] #include <iostream> using namespace std; int main () { cout << "Hello World!"; system("PAUSE"); return 0; }[/CODE] I get this error: [ICODE] C:\Dev-Cpp\Makefile.win [Build Error] [helloworld.o] Error 1 [/ICODE] Compile log is as follows: …

0
132
Member Avatar for Majoni

When reading characters from standard input what does it mean when you are asked to sop on hitting EOF in the input?

Member Avatar for gourav1
1
362
Member Avatar for permutations

Hi! I am trying to figure out a way to store all tokens of a sentence into an array except the token 'done' which is the last word of the sentence, but not part of the sentence itself (it is purely there to signify the end of the sentence). After …

Member Avatar for x_bharg
0
3K
Member Avatar for kartik bodala
Member Avatar for cvanithakpm

hi any one help me.. in this pgm if i use pointer in name means it correctly working, but by using array to name it doesnt work properly... it shows lvalue required.. by using array i need to run this pgm.... plz help me... main() { type def struct { …

Member Avatar for zeroliken
0
99
Member Avatar for Xinen

Let's say I input the letter: c it will show: c - cat How do I do that? Thank you!

Member Avatar for Adak
0
135
Member Avatar for joy39

i have got a project where i have to connect c program to mysql database. but, i have zero knowledge of mysql. so, iwas looking for a mysql tutorial with c language . but. most of the tutorials online are mysql with php. so, could you please provide me some …

Member Avatar for L7Sqr
0
117
Member Avatar for tubby123

Hello people, I want to write a program which does the equivalent of going to google and searching for a word. So, for example, instead of going to google and typing out 'daniweb', I want to do that from a program. Does google offer any api's for that ?

Member Avatar for tubby123
0
82
Member Avatar for asrockw7

I want to make a simple chat program after I got my first winsock program to work. The thing with chat is that the receiving part seems to work simultaneously with the sending part, but the thing is `recv()` seems to hold until it receives something(like any stdin function, I …

Member Avatar for nezachem
0
154
Member Avatar for ben25x

This code prints coordinates for a square that another program uses. For space's sake I have cut out all the other program's code, but I believe it is a simple syntax mistake with my if() statements. I have followed the rules and looked just about everywhere and followed all of …

Member Avatar for Adak
0
171

The End.