Sponsored Content
Full Discussion: Symbol table of a C program
Top Forums Programming Symbol table of a C program Post 302368494 by pludi on Thursday 5th of November 2009 02:25:49 AM
Old 11-05-2009
The line
Code:
*p='T';

has 2 problems:
  1. You're trying to assign a character value (which is a value between 0 and 255), not a pointer
  2. You're trying set the target of the pointer to another pointer, not redefine the original pointer

This line should work:
Code:
p="T";

Remember: single quotes = character, double quotes = pointer to NULL-terminated character array ("string")
 

10 More Discussions You Might Find Interesting

1. Programming

no symbol table

Hi@all, I try to compile c code on hpux 11.11 pa-risc 2 with gcc (32bit). I compile with the option -g, so that I get the symbol table, but it is not available. Does someone knows something on this? thx (2 Replies)
Discussion started by: Dom_Cyrus
2 Replies

2. Programming

how to view symbol table in unix

hi , How to view the contents of a "c" program symbol table information in unix. (1 Reply)
Discussion started by: saravanan_nitt
1 Replies

3. Linux

Reading ELF file Symbol table of C++ program

Folks, I have some program(Test.cpp) as follows, #include<iostream> class Abc { private: int _theVar; public : int printVar(); }; int Abc :: printVar() { _theVar=10; } main() { Abc _t; (0 Replies)
Discussion started by: vinod_chitrali
0 Replies

4. Programming

Reading ELF file Symbol table of C++ program

Folks, I have some program(Test.cpp) as follows, #include<iostream> class Abc { private: int _theVar; public : int printVar(); }; int Abc :: printVar() { _theVar=10; } main() { Abc _t; (2 Replies)
Discussion started by: vinod_chitrali
2 Replies

5. Solaris

/usr/lib/passwdutil.so.1: symbol __nsl_fgetspent_r: referenced symbol not found

deleteing post (0 Replies)
Discussion started by: dshakey
0 Replies

6. Programming

C program to display a busy symbol while processing

Hi I was wondering how can a c program will be implemented which will display a symbol while calculating something. for example : program should display some charters like /\/\ while calculating. At least provide some pointers thanks (4 Replies)
Discussion started by: rakeshkumar
4 Replies

7. UNIX for Dummies Questions & Answers

Creating a condensed table from a pre-existing table in putty

Hello, I'm working with putty on Windows 7 professional and I'd like to know if there's a way to gather specific lines from a pre-existing table and make a new table with that information. More specifically, I'd like the program to look at a specific column, say column N, and see if any of the... (5 Replies)
Discussion started by: Deedee393
5 Replies

8. Shell Programming and Scripting

Build a table from a list by comparing existing table entries

I am new to this shell scripting.... I have a file which contains list of users. This files get updated when new user comes into the system. I want to create script which will give a table containing unique list of users. When I say unique, it means script should match table while parsing... (3 Replies)
Discussion started by: dchavan1901
3 Replies

9. Web Development

Getting Rid of Annoying Bootstrap Table Borders and Wayward Table Lines

Bootstrap is great; but we have had some issues with Bootstrapped <tables> (and legacy <fieldset> elements) showing annoying, wayward lines. I solved that problem today with this simple jQuery in the footer: <script> $(function(){ $('tr, td, fieldset,... (0 Replies)
Discussion started by: Neo
0 Replies

10. Programming

Search the symbol table of a child process

Hi, I am a newbie in Linux land, and I have a question about programming parent/child process interaction: How do I search the value of a symbol in the child process? Is it possible? I am doing a fork() and execve() to spawn any child possible, and I need something on the parent side to... (12 Replies)
Discussion started by: alphakili
12 Replies
mbtowc(3int)															      mbtowc(3int)

Name
       mbtowc - converts a single multibyte character into a character of type wchar_t

Syntax
       #include <stdlib.h>

       int mbtowc (pwc, s, n)
       wchar_t *pwc;
       const char *s;
       size_t n;

Arguments
       pwc     The pwc argument is a pointer to the resulting object of type wchar_t.

       s       The s argument is a pointer to a multibyte character.

       n       The n argument is the maximum number of bytes of object s that are examined.

Description
       If  s  is  not  a null pointer, the function determines the number of bytes that comprise the multibyte character pointed to by s.  It then
       determines the character code for the value (of type wchar_t) that corresponds to that multibyte character (the value of  the  code  corre-
       sponding to the null character is zero). If the multibyte character is valid and pwc is not a null pointer, the function stores the code in
       the object pointed to by pwc.  At most n bytes of the array pointed to by s are examined.  This function is affected by the LC_CTYPE  cate-
       gory of the current locale.

Return Values
       If s is a null pointer, the function returns a zero value.  If s is not a null pointer, the function returns:

	  o  0, if s points to the null character

	  o  The number of bytes that comprise the converted multibye character, if the next n or fewer bytes form a valid multibye character

	  o  - -1, if the next n or fewer bytes do not form a valid multibye character

       In no case is the value returned greater than n or the value of the MB_CUR_MAX macro.

See Also
       mblen(3int), mbstowcs(3int), setlocale(3int), wctomb(3int), wcstombs(3int)

																      mbtowc(3int)
All times are GMT -4. The time now is 06:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy