exec can be used to assign a value to a bind variable:
variable num number
exec :num := 42
select * from xyz where id = :num;
Using execute does not change SQL*Plus' buffer.
Peculiarity
If the init parameternls_length_semantics is set to byte, then using exec to assign a text value to a bind variable truncates it to the length of the variable:
SQL> alter session set nls_length_semantics=byte;
SQL> var txt varchar2(5)
SQL> exec :txt := 'hello world'
SQL> print txt
TXT
--------------------------------
hello