15,551 Topics
| |
oke I was coding some stuff involving 2d array allocating i normally know how to do it in main coz you don't need to pass adr main ptr that get's allocated but when i made it i got somewhat confused I don't know why it went wrong [code] #include <stdio.h> … | |
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 … | |
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 … | |
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. | |
[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 … | |
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( _, … | |
[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 … | |
| 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 … |
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 … | |
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, … | |
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, … | |
hi is there any way by which we can write a program that displays its own source code???????:?::-/ | |
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 … | |
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 … | |
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 … | |
Hi! please tell what is the function intead of getdelim to work as getdelim in windows. because it is supported for windows envirnmnt na.. | |
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. | |
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 { … | |
hi all. from where i can download this header file ncurses.h for windows? thnx in advance | |
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 … | |
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] | |
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 … | |
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. … | |
[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 … | |
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 … | |
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 … | |
Can anyone provide me certain project topics in c/c++? i wan a sooner reply | |
"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 … | |
[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 … | |
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? … |
The End.