Search:

Type: Posts; User: ackr1201

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    1,523

    read data from the file using fgets, then using...

    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...
  2. Replies
    7
    Views
    1,219

    @laserlight: Thx for the suggestion.... My...

    @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...
  3. Replies
    7
    Views
    1,219

    What is the output & please explain?

    #include<stdio.h>
    int main()
    {
    int a=2,b=3;
    a=a + b - (b=a);
    printf("%d %d",a,b);
    return 0;
    }
  4. Replies
    5
    Views
    1,143

    As in most of the cases they will be allocated...

    As in most of the cases they will be allocated contiguously because of this I got doubt.
  5. Replies
    5
    Views
    1,143

    thx but In the second question for int memory is...

    thx but In the second question for int memory is allocated at 3217296440 following ur concept it should have allocated at 3217296444
  6. Replies
    5
    Views
    1,143

    Explain why I am get respective o/p's??

    //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...
  7. Replies
    6
    Views
    1,205

    Please explain why output is 4??

    //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-- ;
    ...
  8. See the following code it is giving exact answer compared to my answer

    //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...
  9. I got output as shown above. I did on gcc...

    I got output as shown above. I did on gcc compiler....
  10. Correct my code as it is giving approximate float value but not exact

    //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...
  11. Replies
    8
    Views
    1,353

    If no extra array is created, then how can we say...

    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??
  12. Replies
    8
    Views
    1,353

    If *b is of type "array of five int" ,then Is any...

    If *b is of type "array of five int" ,then Is any extra array getting created for this purpose?
  13. Replies
    8
    Views
    1,353

    Explain the difference between b and *b?

    #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:
  14. Explain me the following question took from K&R exercises?

    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...
  15. Replies
    5
    Views
    3,017

    many thx for the explanation...

    many thx for the explanation...
  16. Replies
    5
    Views
    3,017

    Doubt in "C Programming Language by K & R"

    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...
  17. Explain following code,doubt written in comments

    /*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...
  18. thanking you coder.......

    thanking you coder.......
  19. If "it gets cut off to fit". can you explain how...

    If "it gets cut off to fit". can you explain how the 1 value is stored in x?
  20. why it is giving output 1 even though it exceeded octal range? Explain

    #include <stdio.h>
    #include <stdlib.h>
    int main()
    {
    char x='\401';
    printf("%d",x);
    return 0;
    }
Results 1 to 20 of 20