C language

  • Thread starter manipalmps
  • Start date
  • #1
could some1 help me in these 3 questions of C language

Q1
Write a program to count the number to count the number of zero’s, one's, blank spaces and other characters using switch statement.

Q2
Write a program to evaluate the series
x-(x^3)/3!+)(x^5)/5!-(x^7)/7! ......... up to (x^n)/n!

Q3
Write a program to print the entered number in reverse order
 

Answers and Replies

  • #2
CompuChip
Science Advisor
Homework Helper
4,302
47
Sure, we're here to help, but we're not going to do the work for you. First, you have to show us some work, or at least ask a more specific question. Don't be ashamed if you think or know it is wrong: a failed attempt is better than no attempt at all.

Otherwise we have no idea at all about your level of programming. Like: do you know how to write and compile a C program? Do you know about variables, loops, arrays, ...? Are you having problems converting the question to an algorithm or just implementing the algorithm in C?
 
  • #3
bro i am a newbie to c
actually i have no idea for 1st and 2nd
i know a bit but not in full detail
 
  • #4
CompuChip
Science Advisor
Homework Helper
4,302
47
Surely you must have some idea... if this is homework/coursework, I can't imagine that your teacher would have you write such programs without any knowledge of C at all.
For Q1, for example, you should at least know how to read a string from keyboard, how to loop through its characters and how a switch statement works. Do you know about cin/getline, for, and switch?
 
  • #5
for,switch i know
 
  • #6
CompuChip
Science Advisor
Homework Helper
4,302
47
So you can start by writing out as specifically and step-by-step as possible what your program should do. For example:

>Start of program
- Ask the user for input string
- Make four counters for zero, one, space and other
- Initialize the counters to zero
- ...
- ...
 
  • #7
berkeman
Mentor
57,682
7,705
bro i am a newbie to c
actually i have no idea for 1st and 2nd
i know a bit but not in full detail
We do not do your work for you. If you have a specific question, post it. If you want us to do your schoolwork for you, you are at the wrong website.
 

Related Threads on C language

  • Last Post
Replies
5
Views
1K
  • Last Post
Replies
13
Views
2K
  • Last Post
Replies
1
Views
4K
  • Last Post
Replies
1
Views
823
Replies
8
Views
510
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
1
Views
688
  • Last Post
Replies
0
Views
2K
Replies
1
Views
2K
  • Last Post
Replies
1
Views
2K
Top