Forum: C 16 Days Ago |
| Replies: 8 Views: 529 int var = 10 ;
int *pvar = &var;
int **ppvar = &pvar;
here var is 10. and this will be stored in some memory say that is
1000 (i.e &var =1000)
so
var =10
&var =1000 |
Forum: C 16 Days Ago |
| Replies: 1 Views: 126 where is your program--------> |
Forum: C 28 Days Ago |
| Replies: 8 Views: 8,055 what is the meaning of largest sum of contiguous integers.
i understood it as below. ( correct me if wrong )
consider the elements of the array are
-1, 2, -3, 2, 0, 5, -11
so the sums of... |
Forum: C 30 Days Ago |
| Replies: 2 Views: 205 Hello ,
i have read the manual page of alloca ,
it is documented there that "alloca works similar to the malloc but it allocates memory from stack and frees automatically.
i can't get how can... |
Forum: C 30 Days Ago |
| Replies: 9 Views: 456 Thank you Aia, Its cleared. |
Forum: C 30 Days Ago |
| Replies: 5 Views: 508 int getch(void);
returns an integer value
so whats the problem, atleast it should print some value. |
Forum: C 31 Days Ago |
| Replies: 9 Views: 456 i dont understand how not casting return value can avoid errors, please just brief about that. |
Forum: C 31 Days Ago |
| Replies: 3 Views: 259 function to display the floating number
the float numbers are stored in sign exponent mantissa fashion
furthur reading
http://steve.hollasch.net/cgindex/coding/ieeefloat.html
void test()
{
... |
Forum: C 31 Days Ago |
| Replies: 6 Views: 353 you are reading the file in wrong order
here is a sample
void read()
{
FILE *fp;
int x;
char t1[50],t2[50];
float f1,f2; |
Forum: C 31 Days Ago |
| Replies: 3 Views: 237 I think this will do..
int main()
{
int a[10]={12,15,19,27,20,31,45,54,59,90};
//int a[10]={1,2,3,3,5,6,7,8,9,10};
int flag;
flag=find_order(a,sizeof(a)/sizeof(a[0])); |
Forum: C 32 Days Ago |
| Replies: 1 Views: 316 pass the headers in the functions and return updated ones. |
Forum: C++ 32 Days Ago |
| Replies: 2 Views: 326 i dont understand your logic but here i am giiving mine.
this is not so efficient but will do the same work.
#include <cstdlib>
#include <iostream>
#include<cstdio>
using namespace std;... |
Forum: C++ 32 Days Ago |
| Replies: 8 Views: 625 every thing is correct except this
it is always false
if (loan=0)
cout << "Months to repay the loan =" << counter <<endl
it should be |
Forum: C++ 32 Days Ago |
| Replies: 1 Views: 569 I hope this will solve your problem
http://www.dreamincode.net/forums/showtopic74004.htm |
Forum: C 34 Days Ago |
| Replies: 9 Views: 456 i have come across this lines often in the forum.
but is it not a better idea/or method to use explicit type casting. |
Forum: C 34 Days Ago |
| Replies: 7 Views: 220 try your code with this input:
(i)
filepairs.txt:
This is line 1
This is line 2
This is line 3
This is line 4
This is line 5
This is line 6 |
Forum: C 34 Days Ago |
| Replies: 9 Views: 456 for (counter1=0;counter1<row;counter1++)
{
*(ptrA+counter1)=(int*)(calloc(column,sizeof(int)));
*(ptrB+counter1)=(int*)(calloc(column,sizeof(int)));... |
Forum: C 34 Days Ago |
| Replies: 7 Views: 220 i dont know spanish but i hope u understand this..
the segments
if (archivopar!=EOF)
and |
Forum: C 34 Days Ago |
| Replies: 9 Views: 344 Thank you All for your time
i will do some research on these according to your suggestions and get back to you soon
:)
Thanks again. |
Forum: C Oct 22nd, 2009 |
| Replies: 9 Views: 344 Thanks for your response Dragon.
actually i work on linux OS and here i can find that read and write system calls are used as internal functions of scanf and printf.
( confused here on how the... |
Forum: C Oct 22nd, 2009 |
| Replies: 9 Views: 344 i googled for some time but dint find any use full rather related information about different OS system calls.
what i got was these below links but these are not having much related info.
... |
Forum: C Oct 21st, 2009 |
| Replies: 9 Views: 344 Hi,
if any one has the idea of the internal system calls which gets activated by using high level statements ( like printf ,scanf or malloc and so on) please provide me the links or any related... |
Forum: C Oct 20th, 2009 |
| Replies: 7 Views: 394 could you please provide me a small code snippet on how that can be done?
do we need to use pointer stuff..!
int main()
{
double nums[] ={16.32,-16.32};
int i=0;
... |
Forum: C++ Oct 20th, 2009 |
| Replies: 10 Views: 307 i just had a glance at your code
you declared
int temp_1, temp_2, temp_3;
and used |
Forum: C Oct 20th, 2009 |
| Replies: 7 Views: 394 decalre a union with one double value and char array of 8 bytes.
in Little Endian format , always the sign will be MSB.
so take 7th array, and perform AND operation with 1(char) left shifted 7... |
Forum: C Oct 18th, 2009 |
| Replies: 4 Views: 300 instead of
p = malloc(length+1);
use
p = (char *) malloc(length+1);
that is not a error, its a warning from the compiler.
because malloc returns pointer to void type |
Forum: C Oct 16th, 2009 |
| Replies: 6 Views: 336 start the main function
declare two int variables
int year, month;
read the year and month values
just a scanf statement with to arguments .
now starts the procedure: |
Forum: C++ Oct 16th, 2009 |
| Replies: 5 Views: 287 printing till 10 starting from some n.( 0< n <=10 )
using while :
int main()
{
int num;
printf("enter number (0 < num <= 10)\n");
scanf("%d",&num);
while(num>0 && num <=10)
... |
Forum: C Oct 16th, 2009 |
| Replies: 2 Views: 265 instead of checking
if(a>b && a>c)
if(b>a && b>c)
if(c>b && c>a)
you could use
void find_big( int, int, int, int* );
int main()
{ |
Forum: C Oct 16th, 2009 |
| Replies: 3 Views: 429 the below code will cover maximum combiantions
for ex:
..1
1..
.
\n
a.a
1..1..1.11 |
Forum: C Oct 16th, 2009 |
| Replies: 5 Views: 283 you could do that by following below
read count;
for(start = 1; start <= conut; start++)
putchar( start + '0' );
for(start = start -2; start > 0; start--)
putchar( start... |
Forum: C++ Oct 16th, 2009 |
| Replies: 7 Views: 378 thanks for your patient description jason
ofcourse i am aware of that. |
Forum: C++ Oct 15th, 2009 |
| Replies: 7 Views: 378 one change is needed in the jas's code ,
the prime numbers starts form 2 .
forgot to check for that !
any number divisible by itself and by 1 is a prime number.
it always have only two... |
Forum: C Oct 15th, 2009 |
| Replies: 6 Views: 284 better you supply the code how you are passing the the arguments to functions or the main program |
Forum: C++ Oct 15th, 2009 |
| Replies: 6 Views: 383 ya i got the warning with all these on.
"struct has no members"
thank you very much TOM.
by the way, i dont know what is -pedantic mean
i know
-Wall - enable all warnings
-ansi - i think... |
Forum: C++ Oct 15th, 2009 |
| Replies: 5 Views: 503 for (int numExs; counter>0; counter--) // C4700 ERROR HERE {
if (numExs>0 && numExs<11)
{
cout<<"X";
}
... |
Forum: C Oct 14th, 2009 |
| Replies: 6 Views: 284 while ( b>=0 && b<15 )
this is where its getting infinite
the value of b is always >0 according to your code
i think it works fine with the following changes
if(b>0 && b <=15)
{
if ( code |
Forum: C Oct 14th, 2009 |
| Replies: 1 Views: 504 specify the requirements clearly :
what do you want to store in linked list numbers or names(strings).
if numbers are to be stored use scanf
else use fgets or
you can define one safe function... |
Forum: C Oct 14th, 2009 |
| Replies: 1 Views: 377 /*
difference between %i ad %d
%i reads the value and it recognizes the value as what base
it is when we read the value as 023 (base 8) it is 19 (base 10)
and... |
Forum: C++ Oct 14th, 2009 |
| Replies: 5 Views: 287 int main()
{
intialize an int variable with the inital value either zero or one
while( variable < maxvalue)
{
//maxvalue is 10 in your case
... |