Here's a LuaLaTeX-based solution.

This solution takes a preprocessor approach. Lua has several very powerful and flexible pattern-matching functions. The Lua function make_replacements
performs two pattern-matching-and-substitution operations on all input material, before TeX even begins its "regular" processing.
Addendum to incorporate the additional information provided by the OP regarding his/her typesetting objectives:
LaTeX is very well suited to handle such typesetting needs. I suggest you (a) define the following macro in the preamble
\newcommand\QQ[1]{\par\noindent Q: {\itshape\textcolor{green}{#1}}\par}
and then write something like
\QQ{What is a pointer?}
or
\QQ{Where are expressions, constants stored if not in memory?}
in the body of the text. Similarly, you'd provide an \AA
macro that provides the basic formatting of the answers.
Here's the code that generates the screenshot shown above.
% !TEX TS-program = lualatex
\documentclass{article}
\usepackage{xcolor,luacode}
%% Lua-side code
\begin{luacode}
function make_replacements ( s )
s = string.gsub ( s , "Q:(.-)%?" , "Q: {\\itshape\\color{blue}%1}?" )
s = string.gsub ( s , "``(.-)''" , "``{\\bfseries\\color{green}%1}''" )
return s
end
\end{luacode}
%% TeX-side code
\AtBeginDocument{\directlua{luatexbase.add_to_callback (
"process_input_buffer" , make_replacements , "make_replacements" )}}
\begin{document}
bla bla Q: Yes? bla bla ``No'' More bla bla
\end{document}
Q: ... ?
strings: shouldQ
and?
be rendered in blue and italics as well?css
magic )...