Discover the depth  of  C

  C C++  Linux ProgrammingNEW   Operating Systems  Data StructuresNEW  Compilers  Contact Us

Navigation

?? Interview Questions ??New

Join C4Swimmers

 sitepromotion.gif (577 bytes) New Member

Weekly Queries New

 Queries for this week

 All Weekly Queries

Code Zone - Free

Newbie Level

Intermediate Level

Tools Zone

C/C++ Tools

Test Your C/C++ Skills

  Playing with printf

  Playing with scanf

  Branching & Loops

  Pointers Part I

  Pointers Part II

  Structure & Union

C Special

  Discovering C
  IFAQs

  Self-reproducing C Code

  C/C++ Links
  C/C++ Books NEW

Programming Problems

  Part I
  Part II
Downloads
C4S - Solution Pack
Data Structures
C++ & 8086 ALP
ADA & System S/w
Online Certifications
premiumservices.gif (1070 bytes) Brainbench
premiumservices.gif (1070 bytes) Benchmarks Global
Help and Support
customer_care_small.gif (1018 bytes)  Suggestions
post-question_icon.gif (1062 bytes)  Contribute
premiumservices.gif (1070 bytes)  Advertise with us
memberhome.gif (1052 bytes)  -Home Page-

premiumservices.gif (1070 bytes) Feedback

As a webmaster of this site, I regard you as our most important critic and commentator. We value your opinion and want to know what we are doing right, what we could do better and any other words of wisdom you're willing to pass our way. It would be our greatest motivation which will help us in developing areas you would like to see in this site. We hope you will continue to encourage and support us in our future endeavors.

 
.  

C For Swimmers : Mastering C step-by-step

 

Search this site powered by FreeFind

Programming Problems - II

NOTE: Following set of C code snippets (non-portable) are tested with TurboC compiler only.
Description

Size

Write a program (W.A.P.) in C to clear the screen and print C FOR SWIMMERS on each line, forming a diagonal pattern running from upper-left to lower right.[Use suitable delay] 1Kb
Some C Functions take variable argument list in addition to taking a number of fixed (known) parameters. Implement using USER-DEFINED C FUNCTION that take VARIABLE ARGUMENT LIST and COMPUTE THE SUM OF VALUES specified in the list.
 Ex: int Sum(int a,...) // Here ... means VARIABLE ARGUMENT LIST
       {
            // Your Code Goes Here to access the values in the variable argument list
       }
       void main(void)
       {
            printf("%d",Sum(5,6,7,8,9,10)); // Prints the RESULT (Sum of these values=45)
       }
1Kb
W.A.P. in C to compute the sum of two values using function that takes two arguments (INTEGERS) and IT SHOULD RETURN the sum WITHOUT USING the RETURN statement but the return type of function is INTEGER ('int' data type). [NOTE : DO NOT MAKE USE OF ANY GLOBAL VARIABLES OR POINTER CONCEPT] 1Kb
W.A.P. in C to SWAP the contents of TWO VARIABLES WITHOUT using ASSIGNMENT OPERATOR. [HINT : USE 'asm' statement] 1Kb
W.A.P. in C to FIND THE LARGEST of two numbers (integer) WITHOUT using ?: operator, if, if...else and switch statements. [HINT : USE 'asm' statement] 1Kb
W.A.P. in C to print the following output WITHOUT USING GOTO STATEMENT, CONDITIONAL STATEMENTS (if, if...else & switch statements) and ANY LOOP STATEMENTS (for, while & do..while) :
     *****
     ****
     ***
     **
     *
1Kb
W.A.P. in C to print the following output WITHOUT USING GOTO STATEMENT, CONDITIONAL STATEMENTS (if, if...else & switch statements) and ANY LOOP STATEMENTS (for, while & do..while) :
     *
     **
     ***
     ****
     *****
1Kb
W.A.P. in C to REVERSE THE WORDS IN A GIVEN LINE OF TEXT. [HINT : USE Built-in function 'strtok' in 'string.h' header file] 1Kb
W.A.P. in C to READ a line of text and WRITE it out BACKWARDS using RECURSIVE Function. 1Kb
Watch out for more...

Code contributors will be highly appreciated and acknowledged. Send your feedback about Programming Problems section to nandakishorkn@rediffmail.com

Free Links from Bravenet.com Free Links from Bravenet.com

Google


WWW c4swimmers.esmartguy.com

You are Visitor No.

Sign my Guestbook View my Guestbook


Subscribe to C4Swimmers Group
Designed and Maintained by  Nanda Kishor

Thanks for using C For Swimmers.
Regarding this material, you can send Bug Reports, Suggestions, Comments, etc. to

nandakishorkn@rediffmail.com

Note: All logos or trademarks are related to their respective owners.

Although every precaution has been taken, the designer(s) owe no responsibility for malicious errors.

No liability assumed for damages resulting from the use of the available information.