What you posted is probably not true. What is (in CREATE PROCEDURE) "idvalue INT integer"? An error! Perhaps you should copy/paste the whole SQL*Plus session so that we'd see what you did and how.
Because, properly written, your code works fine (although, I'd suggest you to use VARCHAR2 instead of CHAR datatype):
SQL> create table customer(name char(10),id INTEGER);
SQL> insert into customer values('JOHN',1);
1 row created.
SQL> select * from customer;
SQL> create or replace procedure custpost (idvalue in integer, custname out char)
4 select name into custname
5 from customer
6 where id = idvalue;
2 l_name char(10);
4 custpost (1, l_name);
5 dbms_output.put_line('Returned: ' || l_name);
PL/SQL procedure successfully completed.
Therefore, a procedure with data you inserted seems to be working fine. I don't use Pro*C/C++ so I can't speak for it; someone else might know it, though.
Finally, here's what Oracle suggests:
Originally Posted by Oracle
ORA-01405: fetched column value is NULL
Cause: The INTO clause of a FETCH operation contained a NULL value, and no indicator was used. The column buffer in the program remained unchanged, and the cursor return code was +2. This is an error unless you are running Oracle with DBMS=6, emulating version 6, in which case it is only a warning.
Action: You may do any of the following:
Use the NVL function to convert the retrieved NULL to another value, such as zero or blank. This is the simplest solution.
Use an indicator to record the presence of the NULL. You probably should use this option when you want a specific action to be taken when a NULL arises.
Revise the cursor definition so that no columns possibly containing NULL values are retrieved.