Search:

Type: Posts; User: dojha00

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    1,251

    I know u can solve them but u don't want to do so...

    I know u can solve them but u don't want to do so ...
    btw i tried 1st and code is below..


    #include<iostream>
    using namespace std;
    int main()
    {
    int i,var,num,j,fix=5;
    var =4;
  2. Replies
    5
    Views
    1,224

    I got something interesting link related to this...

    I got something interesting link related to this topic so i thought to put it here..

    Cambridge University Engineering Department - C++ Input/Output
  3. Thread: Pointer Error

    by dojha00
    Replies
    6
    Views
    1,223

    What i understand is that u want to store second...

    What i understand is that u want to store second half of the string in 'same' string using strcpy function and u want to send the address of second half---
    if it's so then write

    ...
  4. Replies
    18
    Views
    2,396

    Thanks grumpy and whiteflags for making me more...

    Thanks grumpy and whiteflags for making me more clear about using %u and %p for printing addresses.
    Btw when i talk about size, i thought about gcc 32-bit compiler(gcc version 4.6.3) which i have...
  5. Make both of them i

    Make both of them i<7 because it has 7 elements starting from 0 to 6.
  6. Replies
    4
    Views
    1,660

    Use matrix(matrix representation of graphs) and...

    Use matrix(matrix representation of graphs) and queue(BFS), will be a better option..
    1st by using matrix and queue get the proper sequence of displaying the nodes and then display the value......
  7. Replies
    7
    Views
    1,488

    As Salem has given u link first read that... Go...

    As Salem has given u link first read that...
    Go and search it on net before asking here..
  8. Replies
    18
    Views
    2,396

    I used %u so it's easy to manipulate. Can u...

    I used %u so it's easy to manipulate.
    Can u please explain the meaning of "undefined behaviour"?


    Let me make clear what i m trying to say in comments:
    1. This printf statement will print the...
  9. Thread: Error checking

    by dojha00
    Replies
    7
    Views
    2,985

    char buff[BUFSIZ]; //BUFSIZ is a constant or...

    char buff[BUFSIZ]; //BUFSIZ is a constant or size of buff array;
    while ( fgets( buff, BUFSIZ, stdin ) != NULL ) {//taking input in buff array using standard input (stdin) of BUFSIZ as a string.read...
  10. Replies
    21
    Views
    11,919

    As i understood your question " array of 20 and u...

    As i understood your question " array of 20 and u want to return 4 to 12 index values."
    So 1st thing is to return address of 4th element and the no of elements u need to read from there in this case...
  11. Replies
    18
    Views
    2,396

    I think this example will make clear the...

    I think this example will make clear the difference between a pointer and an array..


    char charr[]="This";
    char *chptr="This";
    printf("%u",&charr);//This will print starting address of string...
  12. Replies
    10
    Views
    1,400

    Think about your conditions in while loop....

    Think about your conditions in while loop....
  13. Line 27 and 34, what are u trying to do ('+k+')...

    Line 27 and 34, what are u trying to do ('+k+') ??
    and again which input is for row and which one is for column quite confusing use proper variables....
  14. Replies
    11
    Views
    1,739

    Add '\0' in the end of str and after that if...

    Add '\0' in the end of str and after that if again it's not working properly, provide the input and corresponding output.
  15. Replies
    7
    Views
    2,312

    Thanks, That was my mistake now it's working fine...

    Thanks, That was my mistake now it's working fine but one more query is that when i was not writting while loop(commenting) control comes till above the while loop(printing line no 15) but after...
  16. Replies
    7
    Views
    2,312

    I don' t think because of that i m getting...

    I don' t think because of that i m getting segmentation fault...
    In main function strlen() returned value is not used and in shift() i think it will work....
  17. Replies
    7
    Views
    2,312

    String segmentation fault

    I have written code to expand a string like "a2b3" in "aabbb" in same string.



    #include<stdio.h>
    #include<string.h>
    int main()
    {
    char str[50],var;
    int i=0,sh=0,len;
  18. Replies
    9
    Views
    2,360

    If You are sure about your program then try...

    If You are sure about your program then try another compiler.
    which compiler r you using right now??
  19. That's okay but line no. 9 is repeating two times...

    That's okay but line no. 9 is repeating two times for same process id(2186) whereas it's showing that process no. 2186 is terminated ..
    just see the o/p.
    and second thing if there is no else part...
  20. Sorry Salem, i have posted some other program...

    Sorry Salem, i have posted some other program (test version). Now i think it's okay.
  21. Replies
    11
    Views
    1,221

    I have compiled this program in Ubuntu10.10 and...

    I have compiled this program in Ubuntu10.10 and it's working.means no execution problem and output starting from 1 and goes on...
  22. Replies
    6
    Views
    1,151

    Hey dob should be character or structure same...

    Hey dob should be character or structure same Socialsecurity and the way u r initializing the firstname and last name is also not proper. You can use pointer to character to store the names..
  23. O/P is not coming properly....(fork() system call)

    Hey, i want to create a child of a child process i have written some codes which is working but it's output is not coming properly...


    #include<stdio.h>
    #include<sys/types.h>
    void main()
    {
    ...
Results 1 to 23 of 23