Search:

Type: Posts; User: Hasnat Abul

Search: Search took 0.00 seconds.

  1. Replies
    4
    Views
    1,131

    This is my attempt. int...

    This is my attempt.


    int scan_olympic(olympic_t *competition)
    {
    int result;
    result = scanf("%c%c%c%d", competition->event, competition->entrant. competition->country, &competition->place);
    ...
  2. Replies
    4
    Views
    1,131

    Simple structure question

    Write a C program that scans data to fill the variable competition declared below and then displays the contents of the structure with suitable labels.


    #define STR_LENGTH 20

    typedef struct
    {...
  3. Replies
    5
    Views
    861

    Global Variables?

    As a general rule, why is it a good idea to avoid the excessive use of global variables. Please answer in detail, better if in points.
  4. Replies
    7
    Views
    3,115

    The objective is to use a linked list to remove...

    The objective is to use a linked list to remove vowels from a string.
  5. Replies
    7
    Views
    3,115

    This is the final code, but it does not work...

    This is the final code, but it does not work after compilation.



    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>


    struct charList /*struct list of char elements*/
  6. Replies
    7
    Views
    3,115

    Okay thanks. That fixed it. How can I refrain...

    Okay thanks. That fixed it.
    How can I refrain from using strlen and free functions, I am trying to do it in C. IN other words, i am trying to replace them.
    Also how do I separate functions and...
  7. Replies
    7
    Views
    3,115

    Thank you a lot. I fixed most of the errors....

    Thank you a lot. I fixed most of the errors. However, there are still few more left. I have mentioned the errors below.



    #include <stdio.h>#include <stdlib.h>
    #include <string.h>
    struct CHlst...
  8. Replies
    7
    Views
    3,115

    Getting errors in my code

    #include <stdlib.h>
    #include <string.h>
    struct CHlst /*define element of list*/
    {
    char c;
    CHlst* next;
    }
    void main()
    {
    char str[200]; /*string*/
  9. Replies
    10
    Views
    1,541

    It works with both valid and invalid dates now.

    It works with both valid and invalid dates now.
  10. Replies
    10
    Views
    1,541

    I did. It does not work i think, it still accepts...

    I did. It does not work i think, it still accepts dates like 35 .

    Here is the code

    void getDate(Car_t fleet[], int z, char dateType) /*Function that gets the date from the user*/{
    int...
  11. Replies
    10
    Views
    1,541

    Is that correct?

    Is that correct?
  12. Replies
    10
    Views
    1,541

    So in the while part i would write? ...

    So in the while part i would write?

    while(day>0 && day <32, month>0 && month<13, year>1899 && year<2013)
  13. Replies
    10
    Views
    1,541

    Error check date loop code

    void getDate(Car_t fleet[], int z, char dateType) /*Function that gets the date from the user*/
    {
    int day, month, year;
    /*put a loop here to error check*/
    if(dateType = 'm')
    ...
  14. Replies
    2
    Views
    2,571

    Thank you.

    Thank you.
  15. Replies
    2
    Views
    2,571

    Pedantic error

    int main(void) /*Main function*/{
    label(); /*Call display function which shows the function of program and name of programmer*/
    Car_t fleet[FLEETSZ]; /*Declaring the fleet array */
    ...
Results 1 to 15 of 15