15,551 Topics
| |
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) { … | |
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 … | |
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? | |
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. | |
Hi all Please suggest an algorithm to find square root of a big number ( 100+ digits ) in C/C++.. Thank you | |
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 … | |
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. | |
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. … | |
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 … | |
: : [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 … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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: … | |
When reading characters from standard input what does it mean when you are asked to sop on hitting EOF in the input? | |
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 … | |
what are the different types of main()?please explain each of them. | |
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 { … | |
Let's say I input the letter: c it will show: c - cat How do I do that? Thank you! | |
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 … | |
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 ? | |
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 … | |
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 … |
The End.