49

The problem with trying to use Google to find tutorials or answers for the C programming language is that C is not an expressive enough name to narrow down the searches. Even coupled with keywords like "Programming" and/or "Language" yields results mostly for C++, C#, and Objective-C.

Is there a way to more effectively search for specific C resources using Google?

9
  • 1
    Programming in C worked for me. Maybe you can use the "" or + or even - tricks of google...
    – c0da
    Sep 20, 2011 at 2:56
  • Oh, I didn't mean just programming in C generally, but specifically certain tutorials and man pages. eg. If I wanted to find a tutorial on passing strings in C... search results may be cluttered with string passing and also manipulation of C# and C++. That example isn't that great because the first few results contain the answer, but I'm coming up short with a good example right now.
    – AndrewKS
    Sep 20, 2011 at 3:01
  • 2
    You can also search directly in the group comp.lang.c (groups.google.com/group/comp.lang.c/topics).
    – Clement J.
    Sep 20, 2011 at 6:26
  • 3
    I once needed to search information on how to manage strings in C. I googled "C strings". I then scrolled down and then some image results appeared... OH MY!
    – Konamiman
    Sep 20, 2011 at 9:01
  • 1
    This problem with searching for programming help was one of the main reason to the start of Stackoverflow.com
    – Jonas
    Sep 20, 2011 at 14:09

8 Answers 8

31

You can use the + or - signs to add or remove weight for a search term.
However the best place to search really isn't google at all, it's StackOverflow

A few google examples anyway:

  • +C for articles where the letter C stands alone
  • +C -C++ for C articles where there are no references to C++
  • +"C Sharp" for articles with weight added to a grouped term
3
  • 4
    Furthermore, you could -c++, -c# to remove those from the serps. Though of course you risk omitting C pages that reference C++/C#...
    – Anonymous
    Sep 20, 2011 at 14:58
  • I think you meant +"C" and not +"C#"?
    – Johan
    Sep 20, 2011 at 14:59
  • 2
    Ah, the joys of single letter languages :)))
    – Rook
    Sep 20, 2011 at 15:35
22

Personally I've always googled "C programming", and then whatever topic regarding the language that I'm curious about... That is...

Until I found out about stack overflow. Now I just use the already existing language tags there, and search within them. If noone has answered any question on the subject of matter (quite rare but it happens every now and then) I ask the question myself. :)

1
  • 1
    +1 This problem with searching for programming help was one of the main reason to the start of Stackoverflow.com
    – Jonas
    Sep 20, 2011 at 14:09
5

My solution barring just going to Stack Overflow and searching by tag there, is to look up what I want to do, then put it in quotes before I search. So "C Programming Tutorial" would probably get what you wanted. Something I looked up a while back, "Matrix multiplication in C" would be similar. Also learning to use Google's advanced search has really become a right of passage of sorts for programmers. I know of people on this and other SE sites who have scripts and settings for their browsers to do a lot of that stuff automatically.

2

For man pages, simply type on Google form: man printf

If you want to narrow to C libraries: man 3C printf

If you are interested in system calls: man 2 select

4
  • Gee, I sure hope you don't mind Unix documentation for everything and you weren't looking for tutorials, discussion, or Windows references.
    – DeadMG
    Sep 20, 2011 at 11:12
  • 1
    @DeadMG - In the second comment of the question, OP specifically mentions man pages. I tried to help on that point.
    – mouviciel
    Sep 20, 2011 at 11:53
  • Unfortunately I am on a Mac and the man pages are either missing or outdated.
    – AndrewKS
    Sep 21, 2011 at 21:17
  • Do you mean that man pages that you retrieve with Google are of no help on Mac or that man pages on your Mac are missing/outdated?
    – mouviciel
    Sep 22, 2011 at 7:17
2

Is there a way to more effectively search for specific C resources using Google?

When looking for C stuff, I avoid a general Google search and try specific resources first:

I do this simultaneously in separate browser tabs. If I don't find anything that way, then I start trawling through Google results.

Anyone else should feel free to add to this, I don't care if it becomes community wiki :)

2

There is a google-page called http://codesearch.google.com/ where you can specify a language like

searching for printf in C means

printf lang:^c$
1
  • But that only searches through actual code listings. Not so useful if you are trying to find reference articles or blogs about C. Oct 5, 2011 at 10:55
0

If you're searching for a specific programming concept, just put 'C' at the beginning of the search. In my experience, early terms have a higher weight - and C is common enough that just about any programming term reveals actual programming information for the language.

Unfortunately, Google sometimes likes to be smart and include/exclude punctuation as it sees fit, so you may match things like C++, C#, and so on for a while.

However, Google can be trained, if you're logged in. I search for programming-related items so often, Google often assumes that's what I mean without needing more clarification. (For example, a search for 'tree' gives me the wikipedia article on the data structure in the results before the type that grow outside - although most of the remaining results are that type of tree). Eventually Google should learn that you mean C, not C++, C#, or the generic letter of the alphabet.

0

I haven't used this extensively but try using the ANSI standard that you are looking for. So if you want to use C89 then google "C89". You will get some stuff that isn't related to C but so far I didn't see a single C# or C++ tutorial. You can also do that with C99.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.