While this is written in K & R "The scope of a name defined with #define is from its point of definition to the end of the source file being compiled."
Why this piece of code is working fine ?
...
Type: Posts; User: _arjun
While this is written in K & R "The scope of a name defined with #define is from its point of definition to the end of the source file being compiled."
Why this piece of code is working fine ?
...
Thanks for replying,
Can you tell me an example where a line is ended by ";" and that line is not called as statement ?
I have written this code
#include <stdio.h>
int main() {
unsigned char c;
Is every line terminated by ";" is a statement in C ?
Which type of statement is "int i;" ?
Is #include <stdio.h> is also a statement?
If my string s size is n and I do something like
s.resize(c); // c < n
will it take constant time or linear?
What will it be in case of c > n.
Thank you all guys :)
Thanks
If I write some thing like this
for(int i = 0 ; i < strlen(s) ; i++)
will it be O(n^2) ?
Also please tell me where can I see codes of standard library of C (GCC) in Ubuntu.
Is it true that is c99, a%b is calulated as sign(a) * (abs(a) % abs(b)) ?
where,
sign(a) = 1 if a is +ve
sign(a) = -1 if a is -ve.
I have written a code in a file 4.c
#incldue<stdio.h>
int main() {
printf("%d",fun(22));
return 0;
}
Hi,
Can anybody tell me whether compilation error given by a compiler are specific to it or Standard say something like "This behavior is an Error and it should be reported as Error on all...
Just confirming
is expression
i = i = 1;
also undefined because it also modifies the object more than once between sequence point
Is there any difference between these two terms.
Thanks
but can be larger than 8 bits(in both c89 and c99), right ?
What are limitations on size of char, are there any differences in c89 and c99 on size of char
I can understand that the size of
struct {
char c;
int x;
}
Thank you so much for clarifying my doubt:)
Actually K&R says that float has single-precision, what I want to know is that whether single-precision is attached with IEEE or not, AFAIK single precision term always comes with IEEE.
Please...
I was reading K&R, in section 2.2 they mentioned that
float is single precision floating point, and
double is double precision floating point
When I checked wiki, it says that "IEEE...
Thanks got it :)
Thanks you very much for such a clear answer :).
Regarding second question I think it should be well defined, because I have read this at many places that "++i" will "first increment the value of...
I was learning sequence point and I get really confused by example given in wikipedia that "i=i++" is undefined,
Can anybody explain me why it is so ? I can understand that "a[i] = i++" is...
Why C provides this '\?', when we can use plain '?' or "?" ?
Thanks :)