[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Programming Questions and Answers

    341 / 434

    Write a program to remove duplicates from a given string

    Input : qqq44inttttervvviiewwww


    Output :

    View Answer |  Strings |  Practice Program | Add to Reading List To Reading List | Asked In |  Experience, Fresher
    Please Login to view the answer

    Tags:No Tags on this question yet!

    342 / 434

    Write an efficient program to remove characters from the first string which are present in the second string

    Input : str1 = q4interview.com
    mask = iewc


    Output :

    View Answer |  Strings |  Practice Program | Add to Reading List To Reading List | Asked In |  Experience, Fresher
    Please Login to view the answer

    Tags:No Tags on this question yet!

    343 / 434

    Write an efficient program to toggle all the bits of a number except k-th bit.

    Input : n = 4294967295, k = 0


    Output :

    View Answer |  Bitwise Operator |  Practice Program | Add to Reading List To Reading List | Asked In |  Experience, Fresher
    Please Login to view the answer

    Tags:No Tags on this question yet!

    344 / 434

    Write an efficient program to set the rightmost unset bit.

    Input : 10


    Output :

    View Answer |  Bitwise Operator |  Practice Program | Add to Reading List To Reading List | Asked In |  Experience, Fresher
    Please Login to view the answer

    Tags:No Tags on this question yet!

    345 / 434

    Write an efficient program to toggle the bits in the given range

    Input : Number n = 17 range l = 2, r = 5


    Output :

    View Answer |  Bitwise Operator |  Practice Program | Add to Reading List To Reading List | Asked In |  Experience, Fresher
    Please Login to view the answer

    Tags:No Tags on this question yet!

    346 / 434

    Find all the Word Greater or equals to 3 characters and for Every Character Write The ASCII of First and Last alphabet . Total it and Check Whether the Number is Prime or not.

    Example :
    ASCII of R : 82
    ASCII of M : 77
    ASCII of B : 66
    ASCII of y : 121

    Sum up All these and check Wether its Prime or Not ?

    Input : NA


    Output : NA

    View Answer |  Basics |  Practice Program | Add to Reading List To Reading List | Asked In |  Fresher
    Please Login to view the answer

    Tags:No Tags on this question yet!

    347 / 434

    WAP to Input a String either in C/JAVA .
    Find all the Words Less than 3 Characters.

    Example :
    Input : Ram is a Boy
    The Words Less than 3 Characters: is a
    The Word Greater or equals to 4 characters: Ram and Boy

    Input : Ram is a Boy


    Output :

    View Answer |  Strings |  Practice Program | Add to Reading List To Reading List | Asked In |  Fresher
    Please Login to view the answer

    Tags:No Tags on this question yet!

    348 / 434

    WAP in C/JAVA taking Input from a File and Counting the Number os Spaces , Capital Letters, Small Letters , Vowels , Special Characters etc.

    Input : NA


    Output : NA

    View Answer |  File |  Practice Program | Add to Reading List To Reading List | Asked In |  Fresher
    Please Login to view the answer

    Tags:No Tags on this question yet!

    349 / 434

    Write a program to find the nth number from series if the x is even and mth number from series, if the x is, was odd.
    Series: 1^m + x or 1^n + x

    Input : NA


    Output : NA

    Please Login to view the answer

    Tags:Accenture

    350 / 434

    Given a list of the array, sort the array in descending order with the frequency of elements.

    Input : [2, 5, 6, 2, 3, 5, 5]


    Output :

    Please Login to view the answer

    Tags:Accenture