Note 1

Take Note:

Take a note while surfing.





Note With Ink

Give your Note a Colorful Tag.




Easy to Access

Stay on same information and in Sync wherever you are.

Note 2

Take Note:

Organize your information,It may take Shape.





Think With Ink

Differ your Content by Color.




Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3

Take Note:

Don't Let information to miss,Because it take shape





Note With Ink

Simple an Easy Way to take a note.




Easy to Access

Get the same in next visit.


Please wait...

Programs Questions and Answers



    Question :: 331
    Write a program to implement stack using Queues.

    Input : NA


    Output : NA

    View Answer View Answer |  Stack |  Discuss in Forum | Add to Reading List To Reading List | Tag to companies Asked In |  Fresher
    Answer In:
     No Discussion on this question yet!
    Tags:

    Global Edge 

    Question :: 332
    Write a program to pairwise swap nodes in a linked list (not their data)(check boundary condition properly).

    Input : NA


    Output : NA

    View Answer View Answer |  Linked List |  Discuss in Forum | Add to Reading List To Reading List | Tag to companies Asked In |  Fresher
    Answer In:
     No Discussion on this question yet!
    Tags:

    Global Edge 

    Question :: 333
    Write program to find height of a binary tree.

    Input : NA


    Output : NA

    View Answer View Answer |  Trees |  Discuss in Forum | Add to Reading List To Reading List | Tag to companies Asked In |  Fresher
    Answer In:
     No Discussion on this question yet!
    Tags:

    Global Edge 

    Question :: 334
    Write program to reverse of string without using any loop.

    Input : NA


    Output : NA

    View Answer View Answer |  Strings |  Discuss in Forum | Add to Reading List To Reading List | Tag to companies Asked In |  Fresher
    Answer In:
     No Discussion on this question yet!
    Tags:

    Global Edge 

    Question :: 335
    Write a program to find cycle in linked list.

    Input : NA


    Output : NA

    View Answer View Answer |  Linked List |  Discuss in Forum | Add to Reading List To Reading List | Tag to companies Asked In |  Fresher
    Answer In:
     No Discussion on this question yet!
    Tags:

    Global Edge 

    Question :: 336
    Write a program to Sort Linked List elements

    Input : NA


    Output : NA

    View Answer View Answer |  Linked List |  Discuss in Forum | Add to Reading List To Reading List | Tag to companies Asked In |  Fresher
    Answer In:
     No Discussion on this question yet!
    Tags:

    Global Edge 

    Question :: 337
    Write a C program to find the area of a triangle given the base and the corresponding height. The values base and height are both positive integers passed to the program as the first and second command line parameters respectively. Note: Write the output to stdout formatted as a floating point number rounded to EXACTLY 2 decimal precision WITHOUT any other additional text. Scientific format(such as 1.00E+5) should NOT be used while printing the output. You may assume that the inputs will be such that the output will not exceed the largest possible real number that can be stored in a float type variable.

    Input : NA


    Output : NA

    View Answer View Answer |  Basics |  Discuss in Forum | Add to Reading List To Reading List | Tag to companies Asked In |  Fresher
    Answer In: C  
     
    #include<stdio.h>
    #include <stdlib.h>
    int main(int argc, char *argv[])

      if (argc < 3)// as number of arguments needed are 2 and 1 is default arg. 
      {
       printf(" Please provide values for both base and height \n");
       return 0;
      } 
    else
     {
      int base = atoi(argv[1]);
      int height = atoi(argv[2]);
      float area = 0.5*base*height;
      printf("%.2f",area);
      return 0;
     }
    }
    Tags:

    TCS 

    Question :: 338
    Write a c program to convert decimal to binary using command line arguments?

    Input : 8723


    Output : 10001000010011

    View Answer View Answer |  Basics |  Discuss in Forum | Add to Reading List To Reading List | Tag to companies Asked In |  Fresher
    Answer In: C  
     
    #include<stdio.h>
     #include<stdlib.h>
     int main(int argc, char *argv[])
     {
     if(argc==1)
     {
     printf("No Arguments ");
     return 0;
     }
     else
     {
     int n;

    n=atoi(argv[1]);
     int binaryN[64];
     int i=0;int j;
     while(n>0)
     {
     //storing in binary array remainder of number
     binaryN[i]=n%2;
     n=n/2;
     i  ;
     }
     //printing reverse array
     while(i)
     {
     printf("%d",binaryN[--i]);
     }

    return 0;
     }
     }
    Tags:

    TCS 

    Question :: 339
    Write a C program to find the sum of N prime number using Command Line Arguments?

    Input : NA


    Output : NA

    View Answer View Answer |  Basics |  Discuss in Forum | Add to Reading List To Reading List | Tag to companies Asked In |  Fresher
    Answer In: C  
     
    <p>#include <stdio.h></p>

    <p>int main(int argc, int *argv[])<br />
    {<br />
        int n,i=1,j=2,k=2,fact=1,sum=0;<br />
        n=atoi(argv[1]);<br />
        while(i<=n)<br />
        {<br />
            fact=1;<br />
            for(j=2;j<=k/2;j  )<br />
            if(k%j==0)<br />
            {<br />
                fact=0;<br />
                break;<br />
            }<br />
            if(fact==1)<br />
            {<br />
                sum=sum k;<br />
                i  ;<br />
            }<br />
            k  ;<br />
        }<br />
        printf("%d",sum);<br />
        return 0;<br />
    }</p>
    Tags:

    TCS 

    Question :: 340
    Write a program to reverse an array without affecting special characters. Note: Given a string, that contains special character together with alphabets ('a' to 'z' and 'A' to 'Z'), reverse the string in a way that special characters are not affected.

    Input : Ab,c,de!$


    Output : ed,c,bA!$

    View Answer View Answer |  Strings |  Discuss in Forum | Add to Reading List To Reading List | Tag to companies Asked In |  Experience, Fresher
    Answer In: C  
     
    #include <stdio.h>
    #include <string.h>
    int isSpecial(char);
    int main()
    {
    char hel[] = "a!!!b.c.d,e'f,ghi";
    char *anj = hel;
    reverseWord(hel);
    printf("%s",anj);
    return 0;
    }

    void reverseWord(char *anj)
    {
        int r = strlen(anj)-1;
        char x;
        int l = 0;
        while (l<r)
        {
        if (!isSpecial(anj[l]))
        {
            l++; }
        else if (!isSpecial(anj[r])) 
        {
            r--;
        }
        else
        {
            x = anj[l];
            anj[l] = anj[r];
            anj[r] = x;
            l++;r--;
        }
        }
    }
    int isSpecial (char x)
    {
        return ((x>='A' && x<='Z') || (x>='a' && x<='z'));
    }
    Tags:

    No Tags on this question yet!