Thanks again Mats :-)
Type: Posts; User: capvirgo
Thanks again Mats :-)
But x is replaced by z, next x is again replaced by y and in the next #define statement y is replaced by x again.
so when the preprocessor comes to the first line "int x = 1;" which #define will...
How does c decides on what x and y are replaced with -
#define z x
#define y x
#define x y
int x = 1;
{
Thanks Mats.
How is c reading this, what does the compiler converts this to
int x = 100 + 10 + 1 - - 1 - + 10 + - 100;
printf("\n\tX = %d\n", x);
Thanks maverix
typedef int (*test) ( float * , float*)
test tmp;
what is the type of tmp, is it int ?
thanks guys
okay, I think, since their is no assignment operator. summing of ++i and ++i does not happen. Right ?
int main()
{
int i=3;
int j;
++i + ++i;
printf("\n\ti=%d j=%d", i ,j); //Prints i = 5. But its (4)+(5) = 9 right?
return 0;
how does this work
main()
{
int i=3;
int j;
j = sizeof(++i+ ++i); // ++i = 4, again ++i = 5. Then ++i + ++i = 5+5 = 10?
Please explain me what is happening
main()
{
int a[][3] = { 1,2,3 ,4,5,6};
int (*ptr)[3] =a; //Is address of 'a' being assigned to (*ptr)[0] or (*ptr)[3]?
printf("%d %d "...
Great, Thanks all
yes, just found out that. what would be a safe way to read lines from keyboard
thats right, thanks. But I added fflush(stdin) just before the gets(), but it still was reading newline character from previous input. Was fflush not flushing stdin buffers ?
When I step through the program the value of the first gets() remain as '\\0' unchanged , so its not picking up any thing from the input buffer
Declaration of address:
#define MAX 100
struct addr
{
char name[80];
char street[40];
char citi[40];
char state[40];
The first gets function gets skiped but the remaining get functions work, that is the control just moves on to the next line. WHy is this happenning
void add_address(void)
{
int slot;...
thanks guys,
with each run, it displays a random number
Below is the small program
#include<stdio.h>
#include<stdlib.h>
int main()
{
printf(" %#f\n", 415);