User specified name for an object [closed] - c

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Is it possible to assign an user specified name to an object.
Usually we declare Sample s;
Can we accept the object name from user?
That is,to make Sample <user-defined-obj-name>;

No, that's not possible (directly) in C. Variable names are a compile-time construct and don't really exist at runtime. The best you can do is make some kind of associative data structure, and map the user-provided strings to your objects there.

Related

Naming multi syllables field in a table [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
Sometimes I want to name a field in a table and this field is composed of a number of syllables!
I wonder how to select the most meaningful name in that case.
For example:
number of successions.
number of weekends
Should I write it:
NumberOfSuccessions
NumOfSuccessions
NumberSuccession
SuccessionNumbers
I care about my attribute naming because I'll deliver this to another developer and I want to get it smoothly.
You should select the first one, i.e. "NumberOfSuccessions" as that looks neat. It is always good to avoid short forms and keep the name as simple as plain english, wherever possible. Also avoid spaces as you have already done, just to make life simple.

Different keyword in sql [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
What is 'PROBLEM:' keyword in sql?
How to use it?
Basically I have seen this keyword in a sql query. But whenever I going to search about this keyword, then everyone posted a reply to get rid from problem in sql. But the main problem is, I failed to make understand to others that, "Problem:" is a keyword.
And this is the main problem. So can anyone describe about this keyword
A word preceding a colon is a label used by goto (https://msdn.microsoft.com/en-us/library/ms180188.aspx)
"PROBLEM" is not a reserved word.

What is the reason to use a suffix on database table and/or column names? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
This question is out of pure curiosity.
Why do some systems and frameworks adopt a suffix on table and/or column names?
Example: the Activiti framework for business process uses the _ character at the end of every column name (ID_, VERSION_, NAME_, ...). I have notice that in some other systems as well.
I'm sure there is a good reason for that.
This is a convention for using names that can be saved words. When you want to call column "from" you can use "from_" because "from" is saved word of SQL.

parsing a large file for some information in a single parse [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have a large file that contains a particular structure.I want to know the top 10 most commonly occurring values for a particular fields in the structure.Will I be able to do it in a single parse?
You'll need to store and update an associative array that contains the field and number of occurrences. Depending on how many different fields there are, your memory will be the limitation.
After that's done, do a sort of the array based on the value.
AFAIK, C does not include an associative array data type, so you'll need to use a 3rd party library, see Looking for a good hash table implementation in C for some options.
As for sorting, there is http://linux.die.net/man/3/qsort.
So ignoring possible memory requirements, you can do it in one pass.

table to store huge data [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Does any one have idea about storing email boby in the sql server. The email body is about 15 lines. what has to be done inorder to maintain a table with 40 different emails contents.
Example:
a : some cotent should be sent
b : some other content
You'll probably want an nvarchar(max) column to store the contents of the body. This allows you to store up to 2GB worth of text...which is kind of a lot of text, so you should be good.

Resources