thanks Cactus_Hugger.. i really wanted to know a case where something of this sort could prove useful :)
Type: Posts; User: technosavvy
thanks Cactus_Hugger.. i really wanted to know a case where something of this sort could prove useful :)
i was just looking at a code and found this:
void assignconst(int *var) {
printf("Hello World");
*var = 111;
return; /*!!!!*/
}
@matsp
the code i have provided is itself the big picture ...and my apologies if u think i have not provided ample information..
i cannot use
*a = (intptr_t)b;
c = (intptr_t *) *a; ...
@matsp
i did see the reason for the warnings before putting my code on the forum..
i just wanted to give you guys whatever i have tried , so that there is a better understanding of what i wish to...
@matsp
i do not want my code to be 64 bit compatiable ..
@all
i have come up with the following solution, do u think there are any issue with this style of coding
#include <stdio.h>...
for info...i am working on a 32 bit intel system with windows XP installed on it..
i am using VISUAL STUDIO 2003 IDE for testing my code.
@laserlight
the complete code is (after i have added the'free' calls) is:
#include <stdio.h>
#include <stdlib.h>
int main() {
int *var_a = malloc(sizeof(int));
int *var_b =...
@C_ntua
hehehe...i tried the 'long' thing and the warning that i quoted was after the changes itself!!
otherwise that first warning is :"warning C4311: 'type cast' : pointer truncation from 'int...
these are the warnings that i am getting
and i have just missed the free() calls because i was just testing the concept as i want to use the same in one of my projects..and i did include...
i know they are pointers and not integers..but an address is an integer value ..and i want that integer value to be extracted from the pointer...
i am stuck with this one..this is what i have coded...
int main() {
int *var_a = malloc(sizeof(int));
int *var_b = malloc(sizeof(int));
int *var_c = NULL;
*var_b = 13;
*var_a =...
is there any way i can redirect the output to a network printer installed on the local network..
hehe...
i checked ...HUGE_VAL is there in the C89 draft...
but is HUGE_VAL part of C89 standard...
if i am not wrong you have quoted using the C99 standard..
bear me if i am wrong :-)
and i have written atof in my first post by mistake.. i am using strtod only..
thanks .... i didn't include math.h initially.. :-|
there is another thing that i need to know...is HUGE_VAL macro part of C89 standards..
if it is not then how can we have a check for huge...
How can i check if there was any overflow or underflow when using strtod..
i googled about it and found that some HUGE_VAL is set accordingly...
but when i used
double temp = atof(yytext);...
i agree with matsp but i wish to know how you were able to conclude that 520 bytes of memory was allocated ... ;)
to make myself more clear.../
i want an equivalent of
var my_var = '\u0041';
print(my_var);
//it is a JavaScript code...and will print A
in C....
i want to write a program which prints the Unicode character equivalent to that code...
for e.g.
if i assign '\u0041' to a variable and then print it...then the output should be A
Is there any...
how can we convert an iterative function into recursive function ..
i know few recursive functions but every time i am asked to convert an iterative function into a recursive one ...i just get...
what is broken???
and u can compile the above code to confirm what i have stated...
i just wanted to know the behavior ...
so i wrote this code..thus i was not expecting anything specific
#include<iostream>
using namespace std;
int main() {
const int a;
cout<<a;
return 0;
}
#include <stdio.h>
int main(void) {
const int a;
printf("%d\n\n\n", *a);
return 0;
}
when i compile and execute the above code on