read data from the file using fgets, then using strtok() function tokenize the read string and store into the structure(preferable structure array). Then print the contents of structure onto the...
Type: Posts; User: ackr1201
read data from the file using fgets, then using strtok() function tokenize the read string and store into the structure(preferable structure array). Then print the contents of structure onto the...
@laserlight: Thx for the suggestion....
My question is that why the output behavior is undefined?
I am thinking that parenthesis is executed first always(as it has highest priority). If it is...
#include<stdio.h>
int main()
{
int a=2,b=3;
a=a + b - (b=a);
printf("%d %d",a,b);
return 0;
}
As in most of the cases they will be allocated contiguously because of this I got doubt.
thx but In the second question for int memory is allocated at 3217296440 following ur concept it should have allocated at 3217296444
//Difference b/w addresses is not matching and difference is also not matching //with declaration size. why??
1.
#include<stdio.h>
int main()
{
char a[0];
int c;
printf("%u %u...
//Compiled on gcc
//I know that this is dependent on compiler but how we are getting o/p as 4 on gcc
#include<stdio.h>
int main()
{
int i=1,j=2,k;
k=(i--,j--) + j-- ;
...
//concept took from K&R book
void main()
{
char s[]="123.654";
double val, power;
int i=0, sign,c;
for (i = 0; isspace(s[i]); i++) //skip white space
;
sign = (s[i] == '-') ? -1 : 1;
if...
I got output as shown above. I did on gcc compiler....
//code to convert string(containing digits) to equivalent float value
//Its giving approx value but not exact value
#include<stdio.h>
#include<ctype.h>
#include<math.h>
int main()
{
char...
If no extra array is created, then how can we say *b is of type "array of five int"...? Is that the property it is holding??
If *b is of type "array of five int" ,then Is any extra array getting created for this purpose?
#include<stdio.h>
void main()
{
int a[]={1,2,3,4,5};
int (*b)[5];
b=a;
printf("%u %u %u\n",b,*b,*b[0]);
printf("%u %u %d",sizeof(b),sizeof(*b),*b[0]);
}
o/p:
Write a program detab that replaces tabs in the input with the proper number
of blanks to space to the next tab stop. Assume a fixed set of tab stops, say every n columns.
Should n be a variable or...
many thx for the explanation...
I couldn't able to understand "The usual practice is to collect extern declarations of variables and functions in a separate file, historically called a header, that is included by #include at the...
/*As float(4 bytes) accepts a max integer value of 33554432, but if we give more than that max value it has to overflow but it is approximate answer ? */
#include<stdio.h>
int main()
{
float...
thanking you coder.......
If "it gets cut off to fit". can you explain how the 1 value is stored in x?
#include <stdio.h>
#include <stdlib.h>
int main()
{
char x='\401';
printf("%d",x);
return 0;
}