https://insights.stackoverflow.com/survey/2020#technology-programming-scripting-and-markup-languages-all-respondents
While in TIOBE index, which is based on search engine traffic, C just overtook Java. These two have been the top two languages since 2002.
https://www.tiobe.com/tiobe-index/
How that can be explained?
Note that I am asking which language is better. I am trying to understand why these two are so different. Because how what programmers tell in a survey be so different from what they google?
Mind you the numbers for each language get out of date very quickly. Visit the actual subreddit to see the true numbers.
As far as I'm concerned Tiobe is at odds with everybody else and should be regarded as junk.
StackOverflow attracts a population of programmers interested in regularly helping out other fellow programmers navigate through whatever arcana of tools and libraries and frameworks and languages etc. It will mostly be this set that takes the survey. It also seems that it is the web/mobile technologists that predominate, which is understandable considering how big a deal web/mobile is. There seem to be so many new&shiny things in that web/mobile sphere, year after year ("Web 2.0" is so early 2000's), and that's certain to keep the arcana wheel going.
Fun factoid: Stack Overflow was founded by Microsoft alumnus Joel Spolsky and developer/blogger Jeff Atwood. Spolsky, while Program Manager on the Excel team, designed Excel Basic and drove Microsoft's Visual Basic for Applications strategy. Atwood says: "I was weaned as a software developer on ... Microsoft BASIC in the 80's... I continued on the PC with Visual Basic 3.0 and Windows 3.1 in the early 90's... I am now quite comfortable in VB.NET or C#, despite the evils of case sensitivity." (https://blog.codinghorror.com/about-me/). Spolsky still seems proud of Visual Basic: "I am always saying 'I could do that in a weekend in Visual Basic' when developers tell me some feature is going to take a year." (https://www.joelonsoftware.com/2018/04/06/the-stack-overflow...). Visual Basic has long been the "most dreaded" language on Stack Overflow surveys, and in 2019 explicitly got dropped from that year's survey. The very fact that VB.NET manages to be in the top 10 of TIOBE, and VB clinging to the top 20 of TIOBE, has often been given as immediate evidence of why TIOBE should not be taken seriously.
There are scores of developers out there that don't need beginner level help with their language or use a proprietary language where the help they get is via professional services training, courses, etc. Think whatever SAS or Oracle ERP Apps use under the hood, as an example.
These surveys only purpose is marketing/research for the owner of the survey.
I'm not surprised that they give different results. You can average the two rankings and get something maybe closer to the real popularity.
You can also rank languages by number of repositories on github and get a ranking with a different bias.