15,550 Topics

Member Avatar for
Member Avatar for freeseif

Hi programmers, I want read line by line a Unicode (UTF-8) text file created by Notepad, i don't want display the Unicode string in the screen, i want just read and compare the strings!. This code read ANSI file line by line, and compare the strings [B]What i want[/B] Read …

Member Avatar for Ancient Dragon
2
2K
Member Avatar for krishnampkkm

hiiii... I wanna create a small application .And by giving a user name and password only it allows the user to enter in to the application . Here I wanna store the user name a and pass word in a text file and I've to check it with the password …

Member Avatar for adcodingmaster
0
124
Member Avatar for Shaikh Mohsin

Hello Friend i want C program to scan Operating System on network,and display the output and can it is possible to connect to that particular OS.....or is there any other way to achieve this thing.

Member Avatar for mvmalderen
0
120
Member Avatar for abhimanipal

[code=c] union u { union u { int i; int j; }a[10]; int b[10]; }u; main() { printf("n%d", sizeof(u)); printf(" %d", sizeof(u.a)); printf("%d", sizeof(u.a[4].i)); } [/code] Hello People. I just came across this piece of C code. I have a couple of question The third printf statement gives me the …

Member Avatar for kvprajapati
1
108
Member Avatar for tien113

bad.c [CODE]#include <stdio.h> main(t,_,a) char * a; { return! 0<t? t<3? main(-79,-13,a+ main(-87,1-_, main(-86, 0, a+1 ) +a)): 1, t<_? main(t+1, _, a ) :3, main ( -94, -27+t, a ) &&t == 2 ?_ <13 ? main ( 2, _+1, "%s %d %d\n" ) :9:16: t<0? t<-72? main( _, …

Member Avatar for Salem
-1
549
Member Avatar for nathanurag

[CODE] #include<stdio.h> void reverse(char s[], int i); main() { int i,c; char s[1000]; for(i=0;(c=getchar())!='\n';i++) { s[i]=c; c=getchar(); } void reverse(s,i); [B] //getting error in this line[/B] return 0; } void reverse(char input[], int n) { int i; for(i=n;i>=0;--i) { printf("%c", input[i]); } } [/CODE] i am writing a program to …

Member Avatar for nathanurag
0
308
Member Avatar for Zach101man

I need help on getting started with a simple program. I made the mistake of taking too long between classes and it has slipped my mind. Design and implement an abstract data type for a matrix of integers. Include a function that will multiply two matrices. Write a small driver …

Member Avatar for WaltP
0
50
Member Avatar for Adami

I wrote an Ansi C# code that finds the smallest number in a several unknown function calls. You can see the code, it is very clear. just need help with how to make the program to not ignore always the first number in the list of each argument list... and …

Member Avatar for Adami
0
118
Member Avatar for Ancient Dragon

The idea for this came from another thread in the C++ forum that wanted to duplicate the _getdelim() function that is supported by GNU compilers g++. I made one major change in that this version does not allocate new memory every time it is called, which is grossly inefficient. Instead, …

Member Avatar for Ancient Dragon
2
314
Member Avatar for Gonbe

Hello Daniweb, I'm trying to create a very simple shell for practicing purposes, but i'm a little bit puzzeled about the usage of execve, the function i use to execute a file. The code fragment underneath shows my usage: [CODE="C"] childPID = vfork(); if (childPID == 0) { execve(input.process, input.parameters, …

Member Avatar for gerard4143
0
267
Member Avatar for nathanurag
Member Avatar for Ancient Dragon
0
148
Member Avatar for Draculaboy1014

So I have this C code which is supposed to check if words from a input.txt are in a dictionary.txt document that I have created. Words in both texts are separeted by comas ej. dog,house,car@ and end with the "@" char. So far I have adjusted the code and it …

Member Avatar for gerard4143
-2
137
Member Avatar for Soileau

I am getting all sorts of incorrect type warnings when I compile the following code: [CODE]// hw1.c // Josh Soileau // 1/19/10 // Program: Asks / stores info on a bank // #include<stdio.h> int main(){ char name[25] = "blank", rating[25] = "blank", state[25] = "blank"; int lobbyists=0, prevemploys=0, number=0; double …

Member Avatar for WaltP
0
176
Member Avatar for Soileau

I am very very blurry about when to use pointers or not. I am writing a function (given below), and trying to pass in two variables, statenumber and state. I have them being passed in as chars, and not char *s. I get error messages both ways. I dont know …

Member Avatar for gerard4143
0
135
Member Avatar for nagajyothi

Hi! please tell what is the function intead of getdelim to work as getdelim in windows. because it is supported for windows envirnmnt na..

Member Avatar for Ancient Dragon
0
136
Member Avatar for adcodingmaster

My question is Y DLL? i know that it saves memory and many process can use 1 DLL file at a time blah blah blah...... but is there any task which can not b achieved without using DLL files?? Please reply in details.

Member Avatar for Ancient Dragon
-2
106
Member Avatar for Gaiety

Is there any problem with the code . Why this code is generating all offsets as 28. [CODE] #include<stdlib.h> #define offsetof( T , M ) (( size_t )(( char *)&(( T *)0) ->r - \ (char *)(T *) 0)) int main(void) { struct STU { char name[20]; struct DATE { …

Member Avatar for Gaiety
0
98
Member Avatar for adcodingmaster
Member Avatar for jonsca
1
121
Member Avatar for speakvair

wn compile a code(400 lines app) after running 3 times through the loop(loop in the sense assume the 200 lines) it says unable to open a file...(which it had opened d previous 3 times and executed wel) so i tried perror() and found "not enough memory" Please suggest me wt …

Member Avatar for thomas_naveen
0
158
Member Avatar for AAAKsu

Hi! Can anyone explain why the output of the code below is [B]6 7 7[/B] ? [CODE]#include <stdio.h> int main () { int a=5; printf ("%d%d%d",a++,a,++a); return 0; }[/CODE]

Member Avatar for Salem
0
64
Member Avatar for eliza2044

Hey guys, I'm working on an SQLite3 wrapper using C programming. I was wondering if you know how can I set database properties such as mode, headers and echo through the C application. For example when running the SQLite shell and you are connected to the database you can do …

Member Avatar for eliza2044
0
108
Member Avatar for John_W

Hey how do I make so this would save myfile as a text file? [CODE]FILE * pFile; char filename[256] = "myfile"; pFile = fopen (("%s",filename), "w"); fclose (pFile);[/CODE] This creates a File named myfile but not as a textfile. I tried to add .txt after %s but that doesn't help. …

Member Avatar for Dave Sinkula
0
127
Member Avatar for Gaiety

[CODE] #include<ncurses.h> int main() { WINDOW *win ; initscr(); win = newwin(10,30,10,10); box( win, ACS_VLINE, ACS_HLINE); refresh(); wrefresh(win); mvwprintw(win , 13, 14, "Enter any Key :\n "); refresh(); wrefresh(win); getch(); refresh(); wrefresh(win); endwin(); printf("END"); return 0; } [/CODE] I just started learning Ncurses and have some questions: i understand that …

Member Avatar for Gaiety
0
149
Member Avatar for paddy8788

I want to launch a new process from a given string of input (including parameter). I tried to use system() but it appears that in the child process, getppid() is not the same as the caller in some runs (probably because system uses the shell as command interpreter). However, if …

Member Avatar for nezachem
0
237
Member Avatar for badboizEnt

i wrote this shell given below. please i need any suggestions and assistance in making this created shell support the following commands: cp (copy), del (delete), hos (prints the hostname of the machine), cd (changes directory), clr (clears the screen), dir (lists contents in directory), environ(lists the environment setting), echo …

Member Avatar for Salem
0
101
Member Avatar for prachi bhujbal

Can anyone provide me certain project topics in c/c++? i wan a sooner reply

Member Avatar for mvmalderen
-6
68
Member Avatar for johndoe444

"How to declare an array of N pointers to functions returning pointers to functions returning pointers to characters? Declare it this way char *(*(*a[N])())(); Even this seems to be correct (char*(*fun_ptr)())(*func[n])();" Is this syntax correct? If so is there any thing more confusing than this? Why do people invent something …

Member Avatar for Dave Sinkula
0
264
Member Avatar for rgpii

[CODE=c] int main(int argc, char** argv) { char c[999]; char alpha[2[26]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','a','b','c','e','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; int pos[26]; int i=0; for(i=0;i<26;i++) { printf("%c\n",alpha[0][i]); } } [/CODE] This code is giving me an "error:exit code with return 1" and a lot of warning saying "excess elements in array initializer". I have kept searching the web and …

Member Avatar for gerard4143
0
2K
Member Avatar for johndoe444

Hi, Where does a static function reside? We know that static variables reside in BSS. So does a static function also reside in any particular place? Again is there any classification of functions like there is for data like heap, stack, BSS. Moreover, is function pointer similar to data pointer? …

Member Avatar for gerard4143
0
1K
Member Avatar for gedas

hey guys, im working on a little program that would ask the user to input file name and would ask the user again to specify the output file so the contents of file one would be transferred in to the file 2. i have been working on it for few …

Member Avatar for gedas
0
176

The End.