English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

what is the c code i need to write to count the functions,arrays,variables,constants,display those function names,array names etc. in a c program

2006-11-16 00:07:30 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

3 answers

you have to create a program that will read in the C code from a file. Then parse pref. line by line, then for each line look for keywords. There is your basic algorithm. It's just a parsing program.

2006-11-16 02:31:44 · answer #1 · answered by Arkane Steelblade 4 · 0 0

A pattern Fibonacci sequence is 0, a million, a million, 2, 3, 5, 8, 13, 21,... The code given previously is tremendous yet in case you concentration on a sequence as shown above it ought to provide a small situation in the different case the above code is sweet. So in holding with what sequence you want to contemplate you are able to regulate. Small variations are: Recursive version in C is- int fibonacci_generator(int n) { if (n == a million) go back 0; else if (n == 2) go back a million; else go back fibonacci_generator(n-a million) + fibonacci_generator(n-2); } Iterative version in C is: int fibonacci_generator(int n) { int n1= 0, n2= a million; int temp; at the same time as (--n)//for n = a million, n1 = 0 and --n=0 which hence does no longer enable the administration enter the loop //and returns n1 { temp = n1 + n2; n1= n2; n2 = temp; } go back n1; } savor

2016-10-16 09:07:14 · answer #2 · answered by ? 4 · 0 0

There isn't a command for that. If you want a program to do that, you'll have to write it.

Rawlyn.

2006-11-16 00:11:00 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers