15,550 Topics

Member Avatar for
Member Avatar for ico303

I have a question about C and mysql. I have a C program that connect to a mysql DB. One of the tables has a cp1251-encoded cyrillic column and when I read it with C I get ???? ?? ??? So is there a way to specify the cp1251 encoding …

0
64
Member Avatar for vijayca

Hi All, I am facing problem with MapViewOfFile. Microsoft function MapViewOfFile() which reads part of file and returns start address of that content. This function needs some other info which is provided by functions like CreateFile, CreateFileMapping etc. UnMapViewOfFile is to close the view. I am using MapViewOfFile() to read …

0
119
Member Avatar for Nikhar

The following is the problem to which I am attempting a solution (in fact I have found the solution, there's a small doubt in a concept):- [quote] Q4) Given a floating point number, write a program to convert it into its lowest irreducible fractional form. Note that the total number …

Member Avatar for Nikhar
0
234
Member Avatar for J_17

Please help me with this: [CODE]#include<stdio.h> #include<dos.h> main() { int x; for(x=1;x<=50;x++) { gotoxy(x,2); delay(1000); printf("TEXT"); } return 0; }[/CODE] I am planning to run the word "TEXT" in this program to the right side, but it didnt work. WHAT'S WRONG WITH MY CODES?

Member Avatar for D.M.
0
68
Member Avatar for jackc121

i have a 2d array that's array[10][10] and a double number. I want to put that number into the 1st line of the array how will i do that? array[0]=number; does not work, is there a simple way of converting it? for instance double number; double list[10][10] number=5.35 i want …

Member Avatar for jackc121
0
168
Member Avatar for Aman6o

In the following code, why does the value of 'b' remain 16 instead of 18?? [CODE]#include <stdio.h> main( ) { int a[5], i, b = 16 ; for ( i = 0 ; i < 5 ; i++ ) a[i] = 2 * i ; f ( a, b ) …

Member Avatar for N1GHTS
0
90
Member Avatar for tayler

make a program that have a password before you wiil enter the main menu and in the main menu there is 4 sub menu ....plz help me.......plzzzzzzzzz

Member Avatar for N1GHTS
0
131
Member Avatar for J_17

I got this program below, but the fgets function did not work... What's wrong with this? [CODE]#include<stdio.h> main() { char name[30]; FILE *fp; fp=fopen("c:\\file.txt","a+"); printf("enter name:"); fgets(name,50,fp); return 0; }[/CODE]

Member Avatar for gerard4143
0
89
Member Avatar for dgreene1210

This is my header file i want to use [CODE]#include <stdio.h> #define my #define LABOR_COST 0.35 #define TAX_RATE .085 void read_data(int* length, int* width, int* customerdiscount, double* costpersquarefoot); void calculate_values(int length, int width, int customerdiscount, double costpersquarefoot, int* area, double* carpetcharge, double* laborcharge, double* installedpricecharge, double* discountcharge, double* subtotalcharge, double* …

Member Avatar for gerard4143
0
168
Member Avatar for untio

Hi, Thanks in advance for reading this message. My problem is that I need to write a program that must list the pdf files in a folder that contain a text pattern. The user writes a text and the program list the files that contain the pattern. I know that …

Member Avatar for N1GHTS
0
186
Member Avatar for soundar

1.what Is The Difference Between Procedure Oriented Language And Object Oriented Language? 2.what Are The Drawbacks Of Procedure Oriented Language?

Member Avatar for N1GHTS
0
117
Member Avatar for asitmahato

How to change the entry point of gcc compiler ? I mean the code will look like the bellow one. [CODE] #include<stdio.h> int entry() //this is the new entry point instead of main. { return 0; }[/CODE] thank you very much..

Member Avatar for L7Sqr
0
2K
Member Avatar for D.M.

Guys, I got a problem in File Handling.. I entered two words(My World)to be saved in a file but the file displays the first word only. Can you guys help me....

Member Avatar for abhishek25
0
120
Member Avatar for toebs

Hi i am trying to get the values from a comma separated .dat file into an array in C. The values in the .dat file only consists of 1 and -1. I have been trying for hours now, so i decided to ask for help. Here is an example from …

Member Avatar for toebs
0
236
Member Avatar for kittu.kishore

I have a doubt regarding [B]stack[/B] in c functions... Here is a program which shows an example... [CODE] #include<stdio.h> int display(); main() { int m=display(); printf("m is : %d\n",m); } int display() { printf("1234\n"); return; } [/CODE] outputs: 1234 m is : 5 [CODE] #include<stdio.h> int display(); main() { int …

Member Avatar for N1GHTS
0
221
Member Avatar for cse.avinash

hey I am having confusion in the output of a simple program. here is the code:- [CODE] int main(void) { printf("%d %d",sizeof('A'),sizeof("A")); return 0; } [/CODE] output on my compiler(gcc):- 4 2. I thought sizeof("A") is considered as string ending with '\0' so there are two characters i.e,2 bytes a …

Member Avatar for gerard4143
0
95
Member Avatar for chezkaty

Hi can you pls help me how this program containing a function that accepts a 5-digit numbers & returns the digit in reverse. like: Enter 5-digit number: 13569 Reversed: 96531 thankyou ;)

Member Avatar for Narue
0
156
Member Avatar for jonkim9483

hey guys, new to daniweb here. This is my first assignment in my first C class at school. I'm having some trouble getting the program to work, was wondering if you folks could give me some tips. I believe I have most of the code down, I think my issue …

Member Avatar for D.M.
0
370
Member Avatar for khsoccer

I am having trouble with making my program read in binary and convert it into an integer so that I can do arithmetic on it, and then output it back out as binary. Here is my code. The first part of it works, and I can read in the 2 …

Member Avatar for D33wakar
0
255
Member Avatar for Tenjune

I'm new here so please don't be rude. Okay, my problem is I don't know the exact code on how you print in reverse in array. Here's the problem: Write a program to input a set of five numbers and print them out n the reverse order of input. Put …

Member Avatar for Narue
0
95
Member Avatar for hackit

i found a very simple program that is very simple but have a great logic. [CODE] #include<stdio.h> #include<conio.h> void main() { int B=1; printf("%d\n%d\n%d",b=15,b>9,b<9); getch(); } [/CODE] this seems very simple to me but the output is very strange to me OUTPUT:- 15 0 1 I tried very much to …

Member Avatar for Narue
0
151
Member Avatar for devanshee

i am confused that when to use '&' sign in arrays. some times in string array or in character array i got confused. bcz array name itself is an address .so an1 can plz help me out of this??

Member Avatar for Narue
0
2K
Member Avatar for UrbanBourbon

This program is driving me crazy. I'm relatively new to programming and I can't figure out how to fix the error in the title (line 50). I'd really appreciate any help. [code=c] #include <stdio.h> #include <string.h> #include <stdlib.h> #define SIZE 20 //constants defined before main #define MAX_LEN 30 double calchours(int …

Member Avatar for Narue
0
2K
Member Avatar for D.M.
Member Avatar for ashok1514
0
645
Member Avatar for geeksforgeek

hello daniweb, I am new to C Programming,can anyone explain me the functionality and uses of getline(),with advantages and its disadvantages and where to use? thanks in advance

Member Avatar for D.M.
0
142
Member Avatar for kylelendo

Hii my question is how do we decide when to use which type of datatype For eg in some program we get int i, whereas in some programs it is float i, whereas in other programs it is double i....so how do we know which datatype to use...I am confused …

Member Avatar for D.M.
0
105
Member Avatar for sheepdogg09

Hi, thank you for taking the time to take a look at this. So here's the deal, my assignment is to write a program that resembles the traditional version of bc. It will translate the more common way of writing arithmetic expressions into postfix form used by the dc utility. …

Member Avatar for nezachem
0
113
Member Avatar for NV43

Hello all. I'm having problems figuring out how to get atof working in my program. I'm not sure exactly what I'm missing, and I was hoping someone could point me in the right direction. Thanks. [CODE]#include <math.h> #include <stdlib.h> #include <ctype.h> #include <stdio.h> static int top = -1; static double …

Member Avatar for NV43
0
98
Member Avatar for Eonimal

Hello! I am trying to make a mimic code of LS command in C. It is compiled with gcc in ubuntu, and I have some questions to ask. I have used opendir to open current directory, and then i read each directory using while loop to print all the directories …

Member Avatar for Eonimal
0
227
Member Avatar for Freude

I am newbie in controllers' programming. Recently, reading manual about ADSP controllers, I saw the key word ".section" in the c code. In another books I saw just "section" without dot. What do these directives mean? And is there any difference between these cases? My compiler works fine with "section," …

Member Avatar for Freude
0
84

The End.