In the above code when i enter some invalid numbers or any char after few iterations it goes into an infinite loop.
Type: Posts; User: enggabhinandan
In the above code when i enter some invalid numbers or any char after few iterations it goes into an infinite loop.
while(1)
{
printf("\n\n\n**********************************************************\n"
"****************WELCOME TO STUDENTS DB********************\n"...
Hi,
I have written program to take a string from the user using fgets() but its not taking the string, and also later in the program i have used scanf to take an integer value from the user even...
Hey below is the link which i found bit useful to understand MACROS...
http://gcc.gnu.org/onlinedocs/cpp/Macros.html#Macros
Hi,
Could any explain the below code.
#include<stdio.h>
#include<string.h>
#define f(a,b) a##b
i had taken few tests online to check my level of understanding and those question were the one which i never went through and could not understand at all.....for u it may look like very silly but...
Thanks Nadroj....thank u very much
and Wraithan if u dont want to suggest then please keep quiet, the forums are present to help the people who are studying on there own. i'm studying on my own and...
Hi,
I'm facing one more problem, i'm not able to understand the below way of casting, whats actually happening here....
#define X(t,m) (size_t) ( (char *) &((t*)0)->m - (char *)(t*)0)
...
'm not a student to ask, i'm a professional (server specialist) but i'm learning C language and hence i found no one around could give me the answer to the question so i posted here.....
That means u say that the below declaration is perfectly right ?
int a[4];
int (*p)[4]=&a;
but whats the significance of 4 there...if we give 7 there will this program work..?
i tried a lot but i could figure out the solution to the above problem could any one help me finding it....
In my class i found assigning an array of 4 integer elements to a pointer in the below fashion...i did not get how is this possible
int a[4];
int (*p)[4]=&a;
it should be some thing like
Hey, Thanks.....i went through the code and i found there ......i got it....thanks a lot
consider the below prototype is a function prototype which does bubble sorting
void bubble(int *a, int elements, int (*fptr) (const int *m, const int *n))
now consider there is a function...
in that i could two functions which take two parameters and struct, "possible answer 3" and "possible answer 4"....
Hi, The below shows the thrid question of my exam which i did not answer as i could not understand the question. Could anyone make me understand this question and help me to find the solution for...
the below was the solution given in FAQ.
"check your compiler's documentation to see if it has a (non-portable) method for flushing input. "
I'm using linux cc compiler to compile my c programs...
This is not home work...this was one of the question asked in my test and i answered "possible answer 4". that was just a wild guess. So now i want to understand this hence i pasted here to find the...
The below was one of the question i got in my test and i guessed the answer and written which may be wrong. So i want to know the right answer to the problem and how to find the solution and if...
then whats the advantage of using array of linked list....just linked list is more than enough right?
Need to help to solve the problem attached as an jpg file with this thread and also waiting to understand steps to do that conversion with typedef
ok now the fflush(stdin) behaviour is undefined....then is there any method by which we are flush the input stream.
I agree with u that fgets is very much better than scanf....but need to understand why scanf fails there and if at all we are in need to use scanf itself then how to solve the above problem
so array of linkedlist is used for Hash Table.....
Yes, i know that fflush is used for output stream, in that case i dont know what to do with the input stream....for exampl....when the user is asked to enter a character user enters "x" so in buffer...