15,552 Topics

Member Avatar for
Member Avatar for dsraju

1)Can you suggest me how to assign a pre-defined 2-dimensional array to a pointer.The intension here is to pass 2-D array to a funtion so that changes in the function will reflect the 2-D array . [code]void main(){ int array[40][40]; fun(array); } void fun(int **array){ ........}[/code] The above code is …

Member Avatar for ~s.o.s~
1
125
Member Avatar for nagarjuna

Hi, I m an engineering student. I wanted to know how r pointers supported in c . How is that any levels of indirection is supported.

0
65
Member Avatar for aaholland

I am writing a program for my college class :eek: It has to record a password, but it cant display it on the screen. It is a unix based enviroment. Does this look correct to you guys? [CODE] main() { int i; char buffer[80]; initscr(); printw("Please enter a password => …

Member Avatar for ~s.o.s~
1
96
Member Avatar for promiscuoustx

Hi all!!! I have been tearing my hair out trying to figure out how to make the below program calculate and display the total sales tax for each location. If anyone can please look at my code and send me in the right direction, I am hoping I can get …

Member Avatar for WaltP
1
940
Member Avatar for smagee12

In a statement like this [code] void mousebuttonhandler(int button, int state, int x, int y) { int counter; if (button == GLUT_LEFT_BUTTON && state == 0) counter ++; printf("Mouse button event, button=%d, state=%d, x=%d, y=%d\n, ", button, state, x, y); glutPostRedisplay(); } [/code] It appears that im trying to count …

Member Avatar for ~s.o.s~
1
118
Member Avatar for Iqbal_h_a

[code] Please look at the following code snippets: char str[]="abcd"; // Gets stored in stack frame. char *str="abcd"; // Where does this gets stored? In case of first declaration ie char str[]="abcd"; the string "abcd" gets stored in the stack frame of the invoked funciton. I wonder where does the …

Member Avatar for ~s.o.s~
-1
198
Member Avatar for pavanpalaksha

Hi All, I am using system function to decrypt an encrypted file, But it's taking too much of time, as a result of file access i want to know how to store the output of system( ) function into local variables instead of a file. Code goes like this. sprintf(syscommand,"des …

Member Avatar for Ancient Dragon
1
287
Member Avatar for hygy486

here is my code i get an error of call of non function in lines 29, 34, 39 and 44 apprecite help or an alternate code if possible here is code [CODE] int main (void) { char desiredgrade; double min_average; double currentaverage; double weight; double score; printf("Please enter your desired …

Member Avatar for ~s.o.s~
0
2K
Member Avatar for Iqbal_h_a

It is not allowed to declare a variable of same structure type but it is allowed to declare a pointer. For example, [code] struct node { int a; struct node x; //not allowed struct node *pnext; //allowed }; [/code] My question is when we can declare a pointer of same …

Member Avatar for Iqbal_h_a
1
191
Member Avatar for ashokkumarrsp
Member Avatar for Dave Sinkula
1
852
Member Avatar for santosdas

Hi, I've c source code developed in 32-bit linux machine. Can I run it in 64-bit linux machine. Thank you. Santos

Member Avatar for Rashakil Fol
1
110
Member Avatar for bh_hensem

Hi, Actually my program will be read some input, as example :- 123 456 789 123 567 456 Then, I want to copy all the data into array and filter out any duplicate or same record..Finally the program will be print the result without duplicate records ? Could somebody guide …

Member Avatar for Salem
0
99
Member Avatar for puppy

I have an assignment that asks me to explain the "order of complexity" of an algorithm. Can anyone explain what that question means? Does that mean what happens first and so on? Thanks.

Member Avatar for Micko
1
96
Member Avatar for muhammad amir

actually i dont have complete concept about bigO notation that usually used to find time complexity my question is in bigO notation why we ignore constant for example f=100n we say that our algorithm has order of n time comlexity or order

Member Avatar for Grunt
1
141
Member Avatar for jahnavi
Member Avatar for ~s.o.s~
-2
79
Member Avatar for padmakar

how to run an audio file in C programming language as we access a textor any other kind of file........

Member Avatar for ~s.o.s~
1
102
Member Avatar for vbcielle

Please help can you help me debug my code i cant display the result and the computation for sum is error... help me please :sad: [code] #include <stdio.h> int i,counter; float sum; struct cgrade { char course[50]; float credit[50]; float grade[50]; }; struct cgrade GPA[50]; main(){ printf("Enter number of courses …

Member Avatar for vbcielle
1
123
Member Avatar for kimw

i am a little bit confused about the actual usage of the find function of map i have say a vector<string> and i want to return the relative position (or iterator) of a key (of type string) in this vector. now, the find function accepts only one input which is …

Member Avatar for Grunt
1
138
Member Avatar for saishn

Again, I don't know what I've done wrong. [code] #include <iostream> using std::cout; using std::endl; #include <cstring> using std::strcpy; using std::strcat; #include <cstdio> using std::sprintf; void destroyMultiCharArray(char * * anArray, int size) { for (int i = 0; i < size; i++) { delete [] anArray[ i ]; } delete …

Member Avatar for saishn
0
302
Member Avatar for the.future.zone

Hello, I seem to be having some C language probs. I just need insight on how I can write this program: a program that reads input , and can replace a char with another one(e.g if I type k, it should replace it with a) using getchar and switch.. case …

Member Avatar for Lerner
0
163
Member Avatar for VinC

I'm trying to use scansets to filter out out some textfiles. #include <stdio.h> int main( void) { int i; char str[ 80], str2[ 80]; scanf("%d %[abcdefg] %s", &i, str, str2); printf("%d %s %s", i, str, str2); getchar(); return 0; } When I input "123abcdtye" I expect the output to be …

Member Avatar for Bench
0
424
Member Avatar for Allisone

Hi, I was asked to go over this block of code and explain what it does. Let me know if this is correct, thank you! [COLOR=DarkGreen]It selects a random EXE file and checks if the first line has the 1234567 signature. If it does it goes to the Subroutine I-executable …

Member Avatar for ~s.o.s~
0
159
Member Avatar for kimw

i am trying to use a boost library [CODE]#include "boost/date_time/gregorian/gregorian.hpp"[/CODE] and my source file is in the same folder as boost. however, during compilation i get errors that directories that gregorian.hpp links to (boost/date_time/compiler_config.hpp) could not be found. i've checked that all the files that gregorian.hpp links to are in …

Member Avatar for Salem
0
223
Member Avatar for ravi_forum

SIr, I wanted to know the C Statement for adding two numbers without using + sign.. Anyone can help me to solve this..... ThanQ

Member Avatar for Salem
0
187
Member Avatar for suneet

Please help me in knowing from where I will be able to find "gdiplus.h". Just because of this file Program is showing an error "FATAL ERROR C:1083 : cannot include open file 'gdiplus.h' No such file or directory"

Member Avatar for WolfPack
0
50
Member Avatar for Mushy-pea

Hello everyone. I know the API of an operating system is a collection of functions within the kernel that are available for applications to use. My question is, how do you call these functions into action from within a C program, if you're compiling the source to run on Linux? …

Member Avatar for mostafadotnet
0
136
Member Avatar for himanjim

Can anybody tell me what are file descriptors in C?? I searched the net but can't clear my concepts!!!

Member Avatar for mostafadotnet
0
154
Member Avatar for insamd

Hey guys, I was wondering if anyone can help me in terms of using atoi to get my my results to add the 1's of my binary output and then join them together... eg. 110101 and 100101 is 4 and 3 = 43. I was thinking of integer dividing the …

Member Avatar for insamd
0
389
Member Avatar for ishwar

Hi, I am using windows , and I wanto know if there is any api that tells me if a directory exists in windows? Thanks , [I] Ishwar[/I]

Member Avatar for WolfPack
0
134
Member Avatar for scoobie

Hi all, I am very new to C code and was wondering if someone could please help me. i am using a program that gets run through a windows command prompt and outputs the result to the command line screen by default. i was trying to get it to output …

Member Avatar for Salem
0
121

The End.