I am not sure what caused the file names however you can look back throught your command history by typing history at the command prompt.
To remove the files I suggest you use something like: /bin/rm -i /full_path_to_directory/*
The -i will cause rm to prompt you about deleting each file.
You might want to use ls -la instead of ls to review the directory listing so you get one file per line and more details on the file size, permissions and date modified.
Since this is in the subject "Shell Programming", I have to assume you are running some varient of Linux, and most likely the bash shell? Linux supports just about any character in a file name, including question marks. If an application wants to create a file with such a name, then it can (usually). The problem starts when trying to scan for these files in a bash script since question marks are wild card characters in bash. To match a real question mark, you have to "escape" them - preceed the question mark character with a backslash. The suggestion by rch1231 is not a bad idea. The rm command will ask you if you want to delete each file in that directory. The only problem is when there are a lot of files with those names. Given that Linux directories can easily contain hundreds, or even thousands of files, that could be quite tedious! :-)
$ ls -la
drwxr-xr-x 30 nick nick 4096 May 4 22:32 .
drwxr-xr-x 3 root root 4096 Oct 15 2012 ..
-rw-r--r-- 1 nick nick 0 May 4 06:44 A????cd new????cat> >> A
-rw-r--r-- 1 nick nick 0 May 4 06:40 A????cd new????cat |A
-rw-r--r-- 1 nick nick 0 May 4 06:43 A????cd new????cat ????A
drwx------ 3 nick nick 4096 Oct 23 2012 .adobe
-rw-r--r-- 1 nick nick 0 May 4 06:46 A?echo A
-rwxr-xr-x 1 nick nick 894 May 5 19:47 asc.sh
-rw------- 1 nick nick 5949 May 7 11:53 .bash_history
-rw-r--r-- 1 nick nick 220 Oct 15 2012 .bash_logout
Actually, in most shells, the question mark is a wildcard that represents any single character, so you should not have to escape it unless the resulting substitution could also match the name of a legit file in the directory. If you look at the error message closely, you will see that the problem is caused by the spaces in the filename - which must be escaped.
Escaping the question mark is necessary, though, if you want to restrict your selection of files to those that contain the question mark. For example: rm -i *\?* This allows you to pursue the solution proposed by rch1231 while avoiding the problem that rubberman warned of.