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?

AndrewKS
  • 1,073
  • 9
  • 16
  • 1
    Programming in C worked for me. Maybe you can use the `""` or `+` or even `-` tricks of google... – c0da Sep 20 '11 at 02: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 '11 at 03:01
  • then also, you need to use those google tricks to find the exact answer... ;) – c0da Sep 20 '11 at 03:05
  • I recommend searching directly from the [C# Documentation](http://msdn.microsoft.com/en-us/vcsharp/aa336803) (kidding). – Joey Adams Sep 20 '11 at 04:41
  • I usually add "pubs opengroup" when I'm looking for library function pages, because the pubs.opengroup pages are great. – BlackJack Sep 20 '11 at 05:58
  • 2
    You can also search directly in the group comp.lang.c (http://groups.google.com/group/comp.lang.c/topics). – Clement J. Sep 20 '11 at 06: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 '11 at 09:01
  • The same about J language. – shabunc Sep 20 '11 at 10:04
  • 1
    This problem with searching for programming help was one of the main reason to the start of Stackoverflow.com – Jonas Sep 20 '11 at 14:09

8 Answers8

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
Daniel Little
  • 1,402
  • 12
  • 16
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. :)

Andreas Johansson
  • 1,763
  • 13
  • 18
  • 1
    +1 This problem with searching for programming help was one of the main reason to the start of Stackoverflow.com – Jonas Sep 20 '11 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

mouviciel
  • 15,473
  • 1
  • 37
  • 64
  • 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 '11 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 '11 at 11:53
  • Unfortunately I am on a Mac and the man pages are either missing or outdated. – AndrewKS Sep 21 '11 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 '11 at 07: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 :)

detly
  • 1,595
  • 12
  • 13
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$
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.

Izkata
  • 6,048
  • 6
  • 28
  • 43
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.

Jetti
  • 5,163
  • 2
  • 26
  • 41