'is there any way to record a macro using question mark in vim

I am new to vim, and while playing around with it for some time I was wondering if it was possible to record a macro with the question mark and save it into the vimrc file or predefining it with the keyword let

for example something like this

let @a='?def'



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source